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 +7,10 @@ from django.db import models | ||
7 | class Migration(DataMigration): | 7 | class Migration(DataMigration): |
8 | 8 | ||
9 | def forwards(self, orm): | 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 | profile = orm['super_archives.UserProfile'].objects.get(user_id=sussumu.pk) | 14 | profile = orm['super_archives.UserProfile'].objects.get(user_id=sussumu.pk) |
12 | sussumu.delete() | 15 | sussumu.delete() |
13 | profile.delete() | 16 | profile.delete() |