From 51b2f664d3bb38cc4e455426be0c3843c8016b29 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Sun, 24 Sep 2017 20:28:25 +0200
Subject: [PATCH] Migrations comply with Django 1.11

---
 comments/migrations/0017_auto_20170729_0717.py    | 4 ++--
 submissions/migrations/0061_auto_20170727_1012.py | 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/comments/migrations/0017_auto_20170729_0717.py b/comments/migrations/0017_auto_20170729_0717.py
index db86be134..8ac6202aa 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 af6a59d02..68ee18e4c 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
-- 
GitLab