diff --git a/scipost_django/submissions/constants.py b/scipost_django/submissions/constants.py index 3a0f4adf879d364e1081275c7ceab7c5fa98ec1d..d6d8f901489ed2b9fdc03295f5d8a03e54f6a789 100644 --- a/scipost_django/submissions/constants.py +++ b/scipost_django/submissions/constants.py @@ -11,37 +11,6 @@ ED_COMM_CHOICES = ( ("StoE", "SciPost Editorial Administration to Editor-in-charge"), ) -ASSIGNMENT_BOOL = ((True, "Accept"), (False, "Decline")) -ASSIGNMENT_NULLBOOL = ((None, "Response pending"), (True, "Accept"), (False, "Decline")) - -ASSIGNMENT_REFUSAL_REASONS = ( - ("BUS", "Too busy"), - ("VAC", "Away on vacation"), - ("COI", "Conflict of interest: coauthor in last 5 years"), - ("CCC", "Conflict of interest: close colleague"), - ("NIR", "Cannot give an impartial assessment"), - ("OFE", "Outside of my field of expertise"), - ("NIE", "Not interested enough"), - ("DNP", "SciPost should not even consider this paper"), -) - -STATUS_PREASSIGNED = "preassigned" -STATUS_INVITED = "invited" -STATUS_ACCEPTED = "accepted" -STATUS_DECLINED = "declined" -STATUS_COMPLETED = "completed" -STATUS_DEPRECATED = "deprecated" -STATUS_REPLACED = "replaced" -ASSIGNMENT_STATUSES = ( - (STATUS_PREASSIGNED, "Pre-assigned"), - (STATUS_INVITED, "Invited"), - (STATUS_ACCEPTED, "Accepted"), - (STATUS_DECLINED, "Declined"), - (STATUS_COMPLETED, "Completed"), - (STATUS_DEPRECATED, "Deprecated"), - (STATUS_REPLACED, "Replaced"), -) - REFEREE_QUALIFICATION = ( (None, "-"), (4, "expert in this subject"), diff --git a/scipost_django/submissions/factories/submission.py b/scipost_django/submissions/factories/submission.py index 1ee651d35d5f574a5d001d168bdd5048186578d3..954fd91956f2bb754df526e26b8cb8187a60e470 100644 --- a/scipost_django/submissions/factories/submission.py +++ b/scipost_django/submissions/factories/submission.py @@ -13,7 +13,7 @@ from comments.factories import SubmissionCommentFactory from journals.models import Journal from ontology.models import Specialty, AcademicField -from ..models import Submission +from ..models import Submission, EditorialAssignment class SubmissionFactory(factory.django.DjangoModelFactory): @@ -301,7 +301,9 @@ class PublishedSubmissionFactory(InRefereeingSubmissionFactory): if create: from submissions.factories import EditorialAssignmentFactory EditorialAssignmentFactory( - submission=self, to=self.editor_in_charge, status=STATUS_COMPLETED + submission=self, + to=self.editor_in_charge, + status=EditorialAssignment.STATUS_COMPLETED, ) @factory.post_generation diff --git a/scipost_django/submissions/forms/__init__.py b/scipost_django/submissions/forms/__init__.py index 9946786d9c8aeafd21da01e201d78c0d75ae3bb3..fde48f72105d7ef6552d9f539967dc4d61658713 100644 --- a/scipost_django/submissions/forms/__init__.py +++ b/scipost_django/submissions/forms/__init__.py @@ -19,8 +19,6 @@ from crispy_bootstrap5.bootstrap5 import FloatingField from dal import autocomplete from ..constants import ( - ASSIGNMENT_BOOL, - ASSIGNMENT_REFUSAL_REASONS, REPORT_ACTION_CHOICES, REPORT_REFUSAL_CHOICES, REPORT_POST_EDREC, @@ -44,12 +42,6 @@ from ..constants import ( STATUS_VETTED, DECISION_FIXED, DEPRECATED, - STATUS_COMPLETED, - STATUS_PREASSIGNED, - STATUS_REPLACED, - STATUS_DEPRECATED, - STATUS_ACCEPTED, - STATUS_DECLINED, ) from .. import exceptions, helpers from ..helpers import to_ascii_only @@ -1466,7 +1458,7 @@ class SubmissionForm(forms.ModelForm): EditorialAssignment.objects.create( submission=submission, to=previous_submission.editor_in_charge, - status=STATUS_ACCEPTED, + status=EditorialAssignment.STATUS_ACCEPTED, ) def set_fellowship(self, submission): @@ -1646,7 +1638,7 @@ class SubmissionReassignmentForm(forms.ModelForm): ) if old_assignment: EditorialAssignment.objects.filter(id=old_assignment.id).update( - status=STATUS_REPLACED + status=EditorialAssignment.STATUS_REPLACED ) # Update Submission and update/create Editorial Assignments @@ -1654,7 +1646,7 @@ class SubmissionReassignmentForm(forms.ModelForm): assignment = EditorialAssignment.objects.create( submission=self.submission, to=self.cleaned_data["new_editor"], - status=STATUS_ACCEPTED, + status=EditorialAssignment.STATUS_ACCEPTED, date_invited=now, date_answered=now, ) @@ -1784,7 +1776,7 @@ class SubmissionPreassignmentForm(forms.ModelForm): elif self.cleaned_data["decision"] == self.FAIL: EditorialAssignment.objects.filter( submission=self.instance - ).invited().update(status=STATUS_DEPRECATED) + ).invited().update(status=EditorialAssignment.STATUS_DEPRECATED) Submission.objects.filter(id=self.instance.id).update( status=Submission.PREASSIGNMENT_FAILED, visible_pool=False, @@ -1848,10 +1840,10 @@ class WithdrawSubmissionForm(forms.Form): # Update all assignments EditorialAssignment.objects.filter( submission=self.submission - ).need_response().update(status=STATUS_DEPRECATED) + ).need_response().update(status=EditorialAssignment.STATUS_DEPRECATED) EditorialAssignment.objects.filter( submission=self.submission - ).accepted().update(status=STATUS_COMPLETED) + ).accepted().update(status=EditorialAssignment.STATUS_COMPLETED) # Deprecate any outstanding recommendations if EICRecommendation.objects.filter(submission=self.submission).exists(): @@ -1898,7 +1890,7 @@ class EditorialAssignmentForm(forms.ModelForm): refereeing_cycle = forms.ChoiceField( widget=forms.RadioSelect, choices=CYCLE_CHOICES, initial=CYCLE_DEFAULT ) - refusal_reason = forms.ChoiceField(choices=ASSIGNMENT_REFUSAL_REASONS) + refusal_reason = forms.ChoiceField(choices=EditorialAssignment.REFUSAL_REASONS) class Meta: model = EditorialAssignment @@ -1974,32 +1966,21 @@ class EditorialAssignmentForm(forms.ModelForm): self.instance.submission = Submission.objects.get(id=self.submission.id) # Implicitly or explicity accept the assignment and deprecate others. - assignment.status = STATUS_ACCEPTED + assignment.status = EditorialAssignment.STATUS_ACCEPTED # Update all other 'open' invitations EditorialAssignment.objects.filter( submission=self.submission - ).need_response().exclude(id=assignment.id).update(status=STATUS_DEPRECATED) + ).need_response().exclude(id=assignment.id).update( + status=EditorialAssignment.STATUS_DEPRECATED, + ) else: - assignment.status = STATUS_DECLINED + assignment.status = EditorialAssignment.STATUS_DECLINED assignment.refusal_reason = self.cleaned_data["refusal_reason"] assignment.save() # Save again to register acceptance return assignment -class ConsiderAssignmentForm(forms.Form): - """Process open EditorialAssignment.""" - - accept = forms.ChoiceField( - widget=forms.RadioSelect, - choices=ASSIGNMENT_BOOL, - label="Are you willing to take charge of this Submission?", - ) - refusal_reason = forms.ChoiceField( - choices=ASSIGNMENT_REFUSAL_REASONS, required=False - ) - - class RefereeSearchForm(forms.Form): last_name = forms.CharField( widget=forms.TextInput( @@ -2021,11 +2002,11 @@ class RefereeSearchForm(forms.Form): class ConsiderRefereeInvitationForm(forms.Form): accept = forms.ChoiceField( widget=forms.RadioSelect, - choices=ASSIGNMENT_BOOL, + choices=((True, "Accept"), (False, "Decline")), label="Are you willing to referee this Submission?", ) refusal_reason = forms.ChoiceField( - choices=ASSIGNMENT_REFUSAL_REASONS, required=False + choices=EditorialAssignment.REFUSAL_REASONS, required=False ) @@ -2478,7 +2459,7 @@ class EICRecommendationForm(forms.ModelForm): if self.assignment: # The EIC has fulfilled this editorial assignment. - self.assignment.status = STATUS_COMPLETED + self.assignment.status = EditorialAssignment.STATUS_COMPLETED self.assignment.save() # Add SubmissionEvents for both Author and EIC @@ -2673,8 +2654,9 @@ class RestartRefereeingForm(forms.Form): latest_activity=timezone.now(), ) self.submission.editorial_assignments.filter( - to=self.submission.editor_in_charge, status=STATUS_COMPLETED - ).update(status=STATUS_ACCEPTED) + to=self.submission.editor_in_charge, + status=EditorialAssignment.STATUS_COMPLETED, + ).update(status=EditorialAssignment.STATUS_ACCEPTED) self.submission.eicrecommendations.active().update(status=DEPRECATED) self.submission.editorialdecision_set.update(status=EditorialDecision.DEPRECATED) diff --git a/scipost_django/submissions/managers/assignment.py b/scipost_django/submissions/managers/assignment.py index 7913241097950da9c7eb04851785ead46fb8a2e1..ac39a34150b51d953b340489b75bd025f378ac40 100644 --- a/scipost_django/submissions/managers/assignment.py +++ b/scipost_django/submissions/managers/assignment.py @@ -6,8 +6,6 @@ from django.conf import settings from django.db import models from django.utils import timezone -from .. import constants - class EditorialAssignmentQuerySet(models.QuerySet): @@ -51,26 +49,26 @@ class EditorialAssignmentQuerySet(models.QuerySet): return ( self.filter( - submission__id=submission_id, status=constants.STATUS_PREASSIGNED + submission__id=submission_id, status=self.model.STATUS_PREASSIGNED ) .order_by("invitation_order") .first() ) def preassigned(self): - return self.filter(status=constants.STATUS_PREASSIGNED) + return self.filter(status=self.model.STATUS_PREASSIGNED) def invited(self): - return self.filter(status=constants.STATUS_INVITED) + return self.filter(status=self.model.STATUS_INVITED) def need_response(self): """Return EdAssignments that are non-deprecated or without response.""" return self.filter( - status__in=[constants.STATUS_PREASSIGNED, constants.STATUS_INVITED] + status__in=[self.model.STATUS_PREASSIGNED, self.model.STATUS_INVITED] ) def ongoing(self): - return self.filter(status=constants.STATUS_ACCEPTED) + return self.filter(status=self.model.STATUS_ACCEPTED) def with_required_actions(self): ids = [o.id for o in self if o.submission.cycle.has_required_actions()] @@ -78,18 +76,18 @@ class EditorialAssignmentQuerySet(models.QuerySet): def accepted(self): return self.filter( - status__in=[constants.STATUS_ACCEPTED, constants.STATUS_COMPLETED] + status__in=[self.model.STATUS_ACCEPTED, self.model.STATUS_COMPLETED] ) def declined(self): - return self.filter(status=constants.STATUS_DECLINED) + return self.filter(status=self.model.STATUS_DECLINED) def declined_red(self): """Return EditorialAssignments declined with a 'red-label reason'.""" return self.declined().filter(refusal_reason__in=["NIE", "DNP"]) def deprecated(self): - return self.filter(status=constants.STATUS_DEPRECATED) + return self.filter(status=self.model.STATUS_DEPRECATED) def completed(self): - return self.filter(status=constants.STATUS_COMPLETED) + return self.filter(status=self.model.STATUS_COMPLETED) diff --git a/scipost_django/submissions/managers/submission.py b/scipost_django/submissions/managers/submission.py index 2079c24dbeeaed92bea3b22530aa6bec79764ab8..d765cc998cde744bda98b56da63bffa024e38cdb 100644 --- a/scipost_django/submissions/managers/submission.py +++ b/scipost_django/submissions/managers/submission.py @@ -293,8 +293,11 @@ class SubmissionQuerySet(models.QuerySet): return self.filter(needs_conflicts_update=True) def has_editor_invitations_to_be_sent(self): + from submissions.models import EditorialAssignment """Return Submissions that have EditorialAssignments that still need to be sent.""" - return self.filter(editorial_assignments__status=constants.STATUS_PREASSIGNED) + return self.filter( + editorial_assignments__status=EditorialAssignment.STATUS_PREASSIGNED, + ) def candidate_for_resubmission(self, user): """ diff --git a/scipost_django/submissions/migrations/0130_auto_20221215_0623.py b/scipost_django/submissions/migrations/0130_auto_20221215_0623.py new file mode 100644 index 0000000000000000000000000000000000000000..ae6b84f2d75daa78f8aa49cae3029251f41ae953 --- /dev/null +++ b/scipost_django/submissions/migrations/0130_auto_20221215_0623.py @@ -0,0 +1,28 @@ +# Generated by Django 3.2.16 on 2022-12-15 05:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0129_alter_submission_status'), + ] + + operations = [ + migrations.AlterField( + model_name='editorialassignment', + name='refusal_reason', + field=models.CharField(blank=True, choices=[('BUS', 'Too busy'), ('VAC', 'Away on vacation'), ('COI', 'Conflict of interest: coauthor in last 5 years'), ('CCC', 'Conflict of interest: close colleague'), ('CCM', 'Conflict of interest: close competitor'), ('COT', 'Conflict of interest: other'), ('NIR', 'Cannot give an impartial assessment'), ('OFE', 'Outside of my field of expertise'), ('NIE', 'Not interested enough'), ('DNP', 'SciPost should desk reject this paper')], max_length=3, null=True), + ), + migrations.AlterField( + model_name='editorialassignment', + name='status', + field=models.CharField(choices=[('preassigned', 'Preassigned'), ('invited', 'Invited'), ('accepted', 'Accepted'), ('declined', 'Declined'), ('completed', 'Completed'), ('deprecated', 'Deprecated'), ('replaced', 'Replaced')], default='preassigned', max_length=16), + ), + migrations.AlterField( + model_name='refereeinvitation', + name='refusal_reason', + field=models.CharField(blank=True, choices=[('BUS', 'Too busy'), ('VAC', 'Away on vacation'), ('COI', 'Conflict of interest: coauthor in last 5 years'), ('CCC', 'Conflict of interest: close colleague'), ('CCM', 'Conflict of interest: close competitor'), ('COT', 'Conflict of interest: other'), ('NIR', 'Cannot give an impartial assessment'), ('OFE', 'Outside of my field of expertise'), ('NIE', 'Not interested enough'), ('DNP', 'SciPost should desk reject this paper')], max_length=3, null=True), + ), + ] diff --git a/scipost_django/submissions/migrations/0131_alter_editorialassignment_status.py b/scipost_django/submissions/migrations/0131_alter_editorialassignment_status.py new file mode 100644 index 0000000000000000000000000000000000000000..6a0b5c90c0c76b33cc2589e0870d4766106fdca7 --- /dev/null +++ b/scipost_django/submissions/migrations/0131_alter_editorialassignment_status.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.16 on 2022-12-15 19:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0130_auto_20221215_0623'), + ] + + operations = [ + migrations.AlterField( + model_name='editorialassignment', + name='status', + field=models.CharField(choices=[('preassigned', 'Preassigned'), ('invited', 'Invited'), ('accepted', 'Accepted'), ('askagainlater', 'Perhaps; ask again later'), ('declined', 'Declined'), ('completed', 'Completed'), ('deprecated', 'Deprecated'), ('replaced', 'Replaced')], default='preassigned', max_length=16), + ), + ] diff --git a/scipost_django/submissions/models/assignment.py b/scipost_django/submissions/models/assignment.py index a7000adef249200393251ddbaa2c3cb6bc3fe673..d8715d372106a5f7c1d67fcc24da2d7a56231441 100644 --- a/scipost_django/submissions/models/assignment.py +++ b/scipost_django/submissions/models/assignment.py @@ -9,30 +9,71 @@ from django.utils import timezone from mails.utils import DirectMailUtil from ..behaviors import SubmissionRelatedObjectMixin -from ..constants import ( - ASSIGNMENT_STATUSES, - STATUS_PREASSIGNED, - STATUS_INVITED, - STATUS_REPLACED, - STATUS_ACCEPTED, - STATUS_DEPRECATED, - STATUS_COMPLETED, - ASSIGNMENT_REFUSAL_REASONS, -) from ..managers import EditorialAssignmentQuerySet class EditorialAssignment(SubmissionRelatedObjectMixin, models.Model): - """Fellow assignment to a Submission to become Editor-in-Charge.""" + """ + Consideration of a Fellow to become Editor-in-Charge of a Submission. + """ + + REFUSE_TOO_BUSY = "BUS" + REFUSE_ON_VACATION = "VAC" + REFUSE_COI_COAUTHOR = "COI" + REFUSE_COI_COLLEAGUE = "CCC" + REFUSE_COI_COMPETITOR = "CCM" + REFUSE_COI_OTHER = "COT" + REFUSE_NOT_IMPARTIAL = "NIR" + REFUSE_OUTSIDE_EXPERTISE = "OFE" + REFUSE_NOT_INTERESTED = "NIE" + REFUSE_DESK_REJECT = "DNP" + REFUSAL_REASONS = ( + (REFUSE_TOO_BUSY, "Too busy"), + (REFUSE_ON_VACATION, "Away on vacation"), + (REFUSE_COI_COAUTHOR, "Conflict of interest: coauthor in last 5 years"), + (REFUSE_COI_COLLEAGUE, "Conflict of interest: close colleague"), + (REFUSE_COI_COMPETITOR, "Conflict of interest: close competitor"), + (REFUSE_COI_OTHER, "Conflict of interest: other"), + (REFUSE_NOT_IMPARTIAL, "Cannot give an impartial assessment"), + (REFUSE_OUTSIDE_EXPERTISE, "Outside of my field of expertise"), + (REFUSE_NOT_INTERESTED, "Not interested enough"), + ( + REFUSE_DESK_REJECT, + "SciPost should desk reject this paper", + ), + ) + + STATUS_PREASSIGNED = "preassigned" + STATUS_INVITED = "invited" + STATUS_ACCEPTED = "accepted" + STATUS_PERHAPS_LATER = "askagainlater" + STATUS_DECLINED = "declined" + STATUS_COMPLETED = "completed" + STATUS_DEPRECATED = "deprecated" + STATUS_REPLACED = "replaced" + ASSIGNMENT_STATUSES = ( + (STATUS_PREASSIGNED, "Preassigned"), + (STATUS_INVITED, "Invited"), + (STATUS_ACCEPTED, "Accepted"), + (STATUS_PERHAPS_LATER, "Perhaps; ask again later"), + (STATUS_DECLINED, "Declined"), + (STATUS_COMPLETED, "Completed"), + (STATUS_DEPRECATED, "Deprecated"), + (STATUS_REPLACED, "Replaced"), + ) + + submission = models.ForeignKey( + "submissions.Submission", + on_delete=models.CASCADE, + ) - submission = models.ForeignKey("submissions.Submission", on_delete=models.CASCADE) to = models.ForeignKey("scipost.Contributor", on_delete=models.CASCADE) status = models.CharField( max_length=16, choices=ASSIGNMENT_STATUSES, default=STATUS_PREASSIGNED ) refusal_reason = models.CharField( - max_length=3, choices=ASSIGNMENT_REFUSAL_REASONS, blank=True, null=True + max_length=3, choices=REFUSAL_REASONS, blank=True, null=True ) invitation_order = models.PositiveSmallIntegerField(default=0) @@ -66,31 +107,31 @@ class EditorialAssignment(SubmissionRelatedObjectMixin, models.Model): @property def preassigned(self): - return self.status == STATUS_PREASSIGNED + return self.status == self.STATUS_PREASSIGNED @property def invited(self): - return self.status == STATUS_INVITED + return self.status == self.STATUS_INVITED @property def replaced(self): - return self.status == STATUS_REPLACED + return self.status == self.STATUS_REPLACED @property def accepted(self): - return self.status == STATUS_ACCEPTED + return self.status == self.STATUS_ACCEPTED @property def deprecated(self): - return self.status == STATUS_DEPRECATED + return self.status == self.STATUS_DEPRECATED @property def completed(self): - return self.status == STATUS_COMPLETED + return self.status == self.STATUS_COMPLETED def send_invitation(self): """Send invitation and update status.""" - if self.status != STATUS_PREASSIGNED: + if self.status != self.STATUS_PREASSIGNED: # Only send if status is appropriate to prevent double sending return False @@ -101,7 +142,7 @@ class EditorialAssignment(SubmissionRelatedObjectMixin, models.Model): mail_sender.send_mail() EditorialAssignment.objects.filter(id=self.id).update( - date_invited=timezone.now(), status=STATUS_INVITED + date_invited=timezone.now(), status=self.STATUS_INVITED ) return True diff --git a/scipost_django/submissions/models/referee_invitation.py b/scipost_django/submissions/models/referee_invitation.py index d700bff8ce071ff7997c5c7c35a0e5579592cba2..19d2e04379c52dea9e3adbd374e1ccdb148e8b93 100644 --- a/scipost_django/submissions/models/referee_invitation.py +++ b/scipost_django/submissions/models/referee_invitation.py @@ -11,8 +11,8 @@ from django.utils import timezone from scipost.constants import TITLE_CHOICES from ..behaviors import SubmissionRelatedObjectMixin -from ..constants import ASSIGNMENT_NULLBOOL, ASSIGNMENT_REFUSAL_REASONS from ..managers import RefereeInvitationQuerySet +from ..models import EditorialAssignment class RefereeInvitation(SubmissionRelatedObjectMixin, models.Model): @@ -22,6 +22,7 @@ class RefereeInvitation(SubmissionRelatedObjectMixin, models.Model): or a non-registered scientist to write a Report for a specific Submission. The instance will register the response to the invitation and the current status of the refereeing duty if the invitation has been accepted. + """ profile = models.ForeignKey( @@ -58,11 +59,15 @@ class RefereeInvitation(SubmissionRelatedObjectMixin, models.Model): nr_reminders = models.PositiveSmallIntegerField(default=0) date_last_reminded = models.DateTimeField(blank=True, null=True) accepted = models.BooleanField( - blank=True, null=True, choices=ASSIGNMENT_NULLBOOL, default=None + blank=True, null=True, + choices=((None, "Response pending"), (True, "Accept"), (False, "Decline")), + default=None, ) date_responded = models.DateTimeField(blank=True, null=True) refusal_reason = models.CharField( - max_length=3, choices=ASSIGNMENT_REFUSAL_REASONS, blank=True, null=True + max_length=3, + choices=EditorialAssignment.REFUSAL_REASONS, + blank=True, null=True, ) fulfilled = models.BooleanField( default=False diff --git a/scipost_django/submissions/models/submission.py b/scipost_django/submissions/models/submission.py index 4fb89212d15b6a1fe123b2c57e712db7eb8d4b12..5d9f218fb09a66a4ef6640c4e89b08f1ba821cc6 100644 --- a/scipost_django/submissions/models/submission.py +++ b/scipost_django/submissions/models/submission.py @@ -25,7 +25,6 @@ from comments.models import Comment from ..behaviors import SubmissionRelatedObjectMixin from ..constants import ( - STATUS_PREASSIGNED, SUBMISSION_CYCLES, CYCLE_DEFAULT, CYCLE_SHORT, @@ -756,7 +755,7 @@ class Submission(models.Model): if self.status != self.SEEKING_ASSIGNMENT: return False - return self.editorial_assignments.filter(status=STATUS_PREASSIGNED).exists() + return self.editorial_assignments.preassigned().exists() def has_inadequate_fellowship_composition(self): """ diff --git a/scipost_django/submissions/views/__init__.py b/scipost_django/submissions/views/__init__.py index 109b0c46285e7628bac8bbd01b60e9a9de350d43..9f7f3e1ab1f079f02885abe2b49609d667b11376 100644 --- a/scipost_django/submissions/views/__init__.py +++ b/scipost_django/submissions/views/__init__.py @@ -41,8 +41,6 @@ from ..constants import ( STATUS_VETTED, STATUS_DRAFT, CYCLE_DIRECT_REC, - STATUS_COMPLETED, - STATUS_DEPRECATED, EIC_REC_PUBLISH, EIC_REC_REJECT, DECISION_FIXED, @@ -72,7 +70,6 @@ from ..forms import ( SubmissionPoolSearchForm, SubmissionOldSearchForm, RecommendationVoteForm, - ConsiderAssignmentForm, EditorialAssignmentForm, VetReportForm, SetRefereeingDeadlineForm, @@ -955,7 +952,7 @@ def assignment_failed(request, identifier_w_vn_nr): if mail_editor_view.is_valid(): # Deprecate old Editorial Assignments EditorialAssignment.objects.filter(submission=submission).invited().update( - status=STATUS_DEPRECATED + status=EditorialAssignment.STATUS_DEPRECATED, ) # Update status of Submission @@ -2621,7 +2618,7 @@ def fix_editorial_decision(request, identifier_w_vn_nr): # Update Editorial Assignment statuses. EditorialAssignment.objects.filter( submission=submission, to=submission.editor_in_charge - ).update(status=STATUS_COMPLETED) + ).update(status=EditorialAssignment.STATUS_COMPLETED) mail_request = MailEditorSubview( request,