SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit dd1a0e67 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Add missing migrations

parent 6ea3cb23
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
# -*- 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'),)},
),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment