Commit f58d51aa16188aa0d689be9717b8a64ddbc20389
1 parent
349251cf
Exists in
master
and in
39 other branches
Fixing datamigration
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/accounts/migrations/0007_remove_at_from_username.py
... | ... | @@ -12,7 +12,7 @@ class Migration(DataMigration): |
12 | 12 | # Use orm.ModelName to refer to models in this application, |
13 | 13 | # and orm['appname.ModelName'] for models in other applications. |
14 | 14 | for u in orm.User.objects.filter(username__contains='@'): |
15 | - u.username = u.username.replace('@', '') | |
15 | + u.username = u.username.split('@')[0] | |
16 | 16 | u.save() |
17 | 17 | |
18 | 18 | def backwards(self, orm): | ... | ... |