SciPost Code Repository

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

Correct bug in saving EICRecommendation

parent 307515aa
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,8 @@ ...@@ -86,7 +86,8 @@
<div id="invitedreportslist"> <div id="invitedreportslist">
{% for report in invited_reports %} {% for report in invited_reports %}
<hr class="hr6"/> <hr class="hr6"/>
{% if user|is_in_group:'Editorial College' and not is_author and not is_author_unchecked %} <!-- {% if user|is_in_group:'Editorial College' and not is_author and not is_author_unchecked %} -->
{% if user.contributor == submission.editor_in_charge %}
{% if report.flagged %} {% if report.flagged %}
<h4 style="color: red">CAUTION: check if this referee has been flagged by the authors</h4> <h4 style="color: red">CAUTION: check if this referee has been flagged by the authors</h4>
{% endif %} {% endif %}
......
...@@ -741,9 +741,15 @@ def eic_recommendation(request, submission_id): ...@@ -741,9 +741,15 @@ def eic_recommendation(request, submission_id):
if request.method == 'POST': if request.method == 'POST':
form = EICRecommendationForm(request.POST) form = EICRecommendationForm(request.POST)
if form.is_valid(): if form.is_valid():
recommendation = form.save() #recommendation = form.save()
recommendation.submission = submission recommendation = EICRecommendation(
recommendation.date_submitted = timezone.now() submission = submission,
date_submitted = timezone.now(),
remarks_for_authors = form.cleaned_data['remarks_for_authors'],
requested_changes = form.cleaned_data['requested_changes'],
remarks_for_editorial_college = form.cleaned_data['remarks_for_editorial_college'],
)
recommendation.recommendation = form.cleaned_data['recommendation']
recommendation.voting_deadline = timezone.now() + datetime.timedelta(days=7) recommendation.voting_deadline = timezone.now() + datetime.timedelta(days=7)
recommendation.save() recommendation.save()
# If recommendation is to accept or reject, # If recommendation is to accept or reject,
......
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