From dd1a0e67cee5d49affef2eb84d3faa0ae68ec95b Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Thu, 27 Jul 2017 10:32:50 +0200 Subject: [PATCH] Add missing migrations --- .../migrations/0014_auto_20170726_2117.py | 6 +++--- .../migrations/0062_auto_20170727_1032.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 submissions/migrations/0062_auto_20170727_1032.py diff --git a/comments/migrations/0014_auto_20170726_2117.py b/comments/migrations/0014_auto_20170726_2117.py index aabeaf9f9..60b9cc655 100644 --- a/comments/migrations/0014_auto_20170726_2117.py +++ b/comments/migrations/0014_auto_20170726_2117.py @@ -6,7 +6,7 @@ from django.db import migrations from guardian.shortcuts import assign_perm -from ..constants import STATUS_PENDING +from ..models import Comment def do_nothing(apps, schema_editor): @@ -18,9 +18,9 @@ def update_eic_permissions(apps, schema_editor): Grant EIC of submission related to unvetted comment permission to vet his submission's comment. """ - Comment = apps.get_model('comments', 'Comment') + # Comment = apps.get_model('comments', 'Comment') -- This doesn't work... count = 0 - for comment in Comment.objects.filter(status=STATUS_PENDING): + for comment in Comment.objects.filter(status=0): if comment.submission: eic_user = comment.submission.editor_in_charge.user assign_perm('comments.can_vet_comments', eic_user, comment) diff --git a/submissions/migrations/0062_auto_20170727_1032.py b/submissions/migrations/0062_auto_20170727_1032.py new file mode 100644 index 000000000..c2f7ac53f --- /dev/null +++ b/submissions/migrations/0062_auto_20170727_1032.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.3 on 2017-07-27 08:32 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0061_auto_20170727_1012'), + ] + + operations = [ + migrations.AlterModelOptions( + name='report', + options={'ordering': ['-date_submitted'], 'permissions': (('can_vet_submitted_reports', 'Can vet submitted Reports'),)}, + ), + ] -- GitLab