Commit 1a21bc44958621f5165abc21903af970062eb7e5
1 parent
4f61f1ad
Exists in
master
and in
39 other branches
Minor fix on accounts data migration
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
src/accounts/migrations/0002_delete_sussumu_dup.py
... | ... | @@ -7,7 +7,10 @@ from django.db import models |
7 | 7 | class Migration(DataMigration): |
8 | 8 | |
9 | 9 | def forwards(self, orm): |
10 | - sussumu = orm['accounts.User'].objects.get(username='Sussumu') | |
10 | + try: | |
11 | + sussumu = orm['accounts.User'].objects.get(username='Sussumu') | |
12 | + except orm['accounts.User'].DoesNotExist: | |
13 | + return | |
11 | 14 | profile = orm['super_archives.UserProfile'].objects.get(user_id=sussumu.pk) |
12 | 15 | sussumu.delete() |
13 | 16 | profile.delete() | ... | ... |