SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 02e9d899 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Hotfix migrations

parent 8ac5f99d
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ def contributor_to_officer(apps, schema_editor): ...@@ -17,7 +17,7 @@ def contributor_to_officer(apps, schema_editor):
# Transfer all Events # Transfer all Events
ProductionEvent = apps.get_model('production', 'ProductionEvent') ProductionEvent = apps.get_model('production', 'ProductionEvent')
for event in ProductionEvent.objects.all(): for event in ProductionEvent.objects.all():
user = User.objects.get(contributor__id=event.noted_by_contributor.id, production_user__isnull=False) user = User.objects.get(contributor__id=event.noted_by.user.contributor.id, production_user__isnull=False)
event.noted_by.id = user.production_user.id event.noted_by.id = user.production_user.id
event.save() event.save()
print(' - ProductionEvents updated') print(' - ProductionEvents updated')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment