diff --git a/production/migrations/0015_auto_20170914_2237.py b/production/migrations/0015_auto_20170914_2237.py index cb9ffcc83c0d5eb059cebe7d315cbc44ba31dc36..ba12a858e4277c5223dfa80d59577b1fabd94347 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')