diff --git a/comments/migrations/0017_auto_20170729_0717.py b/comments/migrations/0017_auto_20170729_0717.py index db86be1347d9f1c75a3c61ef6d07bf5028ae94c9..8ac6202aae5df406daa83cbee1b9f94c043ded68 100644 --- a/comments/migrations/0017_auto_20170729_0717.py +++ b/comments/migrations/0017_auto_20170729_0717.py @@ -11,10 +11,10 @@ from guardian.shortcuts import assign_perm def update_all_contenttypes(**kwargs): from django.apps import apps - from django.contrib.contenttypes.management import update_contenttypes + from django.contrib.contenttypes.management import create_contenttypes for app_config in apps.get_app_configs(): - update_contenttypes(app_config, **kwargs) + create_contenttypes(app_config, **kwargs) def create_all_permissions(**kwargs): diff --git a/submissions/migrations/0061_auto_20170727_1012.py b/submissions/migrations/0061_auto_20170727_1012.py index af6a59d02f96680652df95d98b9354de9c0fd5fd..68ee18e4cbec33f3ad1ac06f40af4c36c704bbe9 100644 --- a/submissions/migrations/0061_auto_20170727_1012.py +++ b/submissions/migrations/0061_auto_20170727_1012.py @@ -6,8 +6,6 @@ from django.db import migrations from guardian.shortcuts import assign_perm -from ..models import Report - def do_nothing(apps, schema_editor): return @@ -18,7 +16,7 @@ def update_eic_permissions(apps, schema_editor): Grant EIC of submission related to unvetted Reports permission to vet his submission's Report. """ - # Report = apps.get_model('submissions', 'Report') -- This doesn't work due to shitty imports + Report = apps.get_model('submissions', 'Report') count = 0 for rep in Report.objects.filter(status='unvetted'): eic_user = rep.submission.editor_in_charge