Skip to content
Snippets Groups Projects
Commit 6a16fe52 authored by kaiyou's avatar kaiyou
Browse files

Fix the time to deletion logic

parent 2c6767e8
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ class User(db.Model):
def time_to_deletion(self):
""" Return timeout for the current account or None
"""
if self.profiles.count():
if self.profiles.filter(Profile.status != Profile.PURGED).count():
return None
timeout = datetime.datetime.now() - User.get_timeout()
if timeout < self.created_at:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment