Skip to content

Commit

Permalink
[DDCZ-33]: Put in assumed date for people who joined ages ago
Browse files Browse the repository at this point in the history
  • Loading branch information
Almad committed Jan 5, 2025
1 parent ffc7677 commit d11c137
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ddcz/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

SESSION_KEYS_TO_PRESERVE = ["skin"]

ASSUMED_JOINED_DATE = datetime(2003, 1, 1)


def migrate_user(profile, password=""):
"""
Expand All @@ -20,7 +22,7 @@ def migrate_user(profile, password=""):
id=profile.id,
username=profile.nick,
password=password,
date_joined=profile.registration_approved_date,
date_joined=profile.registration_approved_date or ASSUMED_JOINED_DATE,
last_login=profile.last_login,
)
profile.user = user
Expand Down

0 comments on commit d11c137

Please sign in to comment.