diff --git a/scipost/templates/partials/scipost/personal_page/submissions.html b/scipost/templates/partials/scipost/personal_page/submissions.html index 55b261d029084f8bccac40ccb1ed40427f32af00..d5609ab54976a82ea77295d1ec83a49d6b60227d 100644 --- a/scipost/templates/partials/scipost/personal_page/submissions.html +++ b/scipost/templates/partials/scipost/personal_page/submissions.html @@ -32,7 +32,7 @@ {% if sub.editor_in_charge %} <a href="{% url 'submissions:communication' sub.arxiv_identifier_w_vn_nr 'AtoE' %}">Write to the Editor-in-charge</a> {% endif %} - {% if sub.revision_requested %} + {% if sub.open_for_resubmission %} · <a href="{% url 'submissions:prefill_using_identifier' %}?identifier={{ sub.arxiv_identifier_wo_vn_nr }}">Resubmit this manuscript</a> {% endif %} </p> diff --git a/submissions/forms.py b/submissions/forms.py index 331c69dd1f22911d514d79ddabb649c88c0a31fb..ce3532d9453ba31a7d73cb908710dcf6c45e3e20 100644 --- a/submissions/forms.py +++ b/submissions/forms.py @@ -144,7 +144,7 @@ class SubmissionChecks: # If submissions are found; check their statuses if submission: self.last_submission = submission - if submission.revision_requested: + if submission.open_for_resubmission: self.is_resubmission = True if self.requested_by.contributor not in submission.authors.all(): error_message = ('There exists a preprint with this arXiv identifier ' @@ -782,12 +782,6 @@ class ReportForm(forms.ModelForm): # An active EICRecommendation is already formulated. This Report will be flagged. self.report_type = REPORT_POST_EDREC - # def clean_file_attachment(self): - # f = self.cleaned_data['file_attachment'] - # r = f.file - # raise - # return f - def save(self): """ Update meta data if ModelForm is submitted (non-draft). diff --git a/submissions/models.py b/submissions/models.py index 808f95b7ce8717873efca89aaa198b3955494071..3211a217d6c60d270c52944046ef8dc32af970e9 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -17,7 +17,7 @@ from .behaviors import SubmissionRelatedObjectMixin from .constants import ( ASSIGNMENT_REFUSAL_REASONS, ASSIGNMENT_NULLBOOL, SUBMISSION_TYPE, ED_COMM_CHOICES, REFEREE_QUALIFICATION, QUALITY_SPEC, RANKING_CHOICES, REPORT_REC, - SUBMISSION_STATUS, REPORT_STATUSES, STATUS_UNVETTED, STATUS_INCOMING, + SUBMISSION_STATUS, REPORT_STATUSES, STATUS_UNVETTED, STATUS_INCOMING, STATUS_EIC_ASSIGNED, SUBMISSION_CYCLES, CYCLE_DEFAULT, CYCLE_SHORT, STATUS_RESUBMITTED, DECISION_FIXED, CYCLE_DIRECT_REC, EVENT_GENERAL, EVENT_TYPES, EVENT_FOR_AUTHOR, EVENT_FOR_EIC, REPORT_TYPES, REPORT_NORMAL, STATUS_DRAFT, STATUS_VETTED, EIC_REC_STATUSES, VOTING_IN_PREP, @@ -202,7 +202,12 @@ class Submission(models.Model): @property def revision_requested(self): """Check if Submission has fixed EICRecommendation asking for revision.""" - if self.status != STATUS_RESUBMITTED: + return self.eicrecommendations.fixed().asking_revision().exists() + + @property + def open_for_resubmission(self): + """Check if Submission has fixed EICRecommendation asking for revision.""" + if self.status != STATUS_EIC_ASSIGNED: return False return self.eicrecommendations.fixed().asking_revision().exists()