Revision 814113c4 snf-astakos-app/astakos/im/migrations/0011_set_old_activation_sent.py
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