SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
dd1a0e67
Commit
dd1a0e67
authored
7 years ago
by
Jorran de Wit
Browse files
Options
Downloads
Patches
Plain Diff
Add missing migrations
parent
6ea3cb23
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
comments/migrations/0014_auto_20170726_2117.py
+3
-3
3 additions, 3 deletions
comments/migrations/0014_auto_20170726_2117.py
submissions/migrations/0062_auto_20170727_1032.py
+19
-0
19 additions, 0 deletions
submissions/migrations/0062_auto_20170727_1032.py
with
22 additions
and
3 deletions
comments/migrations/0014_auto_20170726_2117.py
+
3
−
3
View file @
dd1a0e67
...
...
@@ -6,7 +6,7 @@ from django.db import migrations
from
guardian.shortcuts
import
assign_perm
from
..
constant
s
import
STATUS_PENDING
from
..
model
s
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
)
...
...
This diff is collapsed.
Click to expand it.
submissions/migrations/0062_auto_20170727_1032.py
0 → 100644
+
19
−
0
View file @
dd1a0e67
# -*- 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
'
),)},
),
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment