SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit c559e78a authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Debug submissions/views.py

parent e087636c
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ class SubmissionUtils(object):
'\n\nhas successfully passed the pre-screening stage. '
'\n\nA Submission Page has been activated at '
'https://scipost.org/submission/' + str(cls.assignment.submission.id) +
'and a refereeing round has been started, with deadline '
' and a refereeing round has been started, with deadline '
'currently set at ' + datetime.datetime.strftime(cls.assignment.submission.reporting_deadline, "%Y-%m-%d") +
'. '
'\n\nWe thank you very much for your contribution.'
......
......@@ -235,10 +235,14 @@ def submission_detail(request, submission_id):
except Comment.DoesNotExist:
author_replies = ()
# To check in template whether the user can submit a report:
is_author = request.user.contributor in submission.authors.all()
is_author_unchecked = (not is_author
and not (request.user.contributor in submission.authors_false_claims.all())
and (request.user.last_name in submission.author_list))
try:
is_author = request.user.contributor in submission.authors.all()
is_author_unchecked = (not is_author
and not (request.user.contributor in submission.authors_false_claims.all())
and (request.user.last_name in submission.author_list))
except AttributeError:
is_author = False
is_author_unchecked = False
context = {'submission': submission, 'comments': comments.filter(status__gte=1, is_author_reply=False).order_by('-date_submitted'),
'invited_reports': reports.filter(status__gte=1, invited=True),
'contributed_reports': reports.filter(status__gte=1, invited=False),
......
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