From 02e9d8990f5d97fdb11bc8443eab5e5df2b603a9 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Sun, 1 Oct 2017 16:12:44 +0200 Subject: [PATCH] Hotfix migrations --- production/migrations/0015_auto_20170914_2237.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/migrations/0015_auto_20170914_2237.py b/production/migrations/0015_auto_20170914_2237.py index cb9ffcc83..ba12a858e 100644 --- a/production/migrations/0015_auto_20170914_2237.py +++ b/production/migrations/0015_auto_20170914_2237.py @@ -17,7 +17,7 @@ def contributor_to_officer(apps, schema_editor): # Transfer all Events ProductionEvent = apps.get_model('production', 'ProductionEvent') 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.save() print(' - ProductionEvents updated') -- GitLab