Revision 814113c4
b/snf-astakos-app/astakos/im/management/commands/showuser.py | ||
---|---|---|
79 | 79 |
'group_permissions': user.get_group_permissions(), |
80 | 80 |
'third_party_identifier': user.third_party_identifier, |
81 | 81 |
'email_verified': format_bool(user.email_verified), |
82 |
'username': user.username |
|
82 |
'username': user.username, |
|
83 |
'activation_sent_date': format_date(user.activation_sent) |
|
83 | 84 |
} |
84 | 85 |
if get_latest_terms(): |
85 | 86 |
has_signed_terms = user.signed_terms() |
b/snf-astakos-app/astakos/im/migrations/0011_set_old_activation_sent.py | ||
---|---|---|
9 | 9 |
def forwards(self, orm): |
10 | 10 |
# set old users activation date sent to epoch |
11 | 11 |
for u in orm.AstakosUser.objects.all(): |
12 |
u.activation_sent = datetime.datetime.utcfromtimestamp(0) |
|
13 |
u.save() |
|
12 |
if not u.is_active: |
|
13 |
u.activation_sent = datetime.datetime.utcfromtimestamp(0) |
|
14 |
u.save() |
|
14 | 15 |
|
15 | 16 |
def backwards(self, orm): |
16 | 17 |
# set old users activation date sent to None |
Also available in: Unified diff