Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add blank field as the first choice for decision #3835

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/review/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def reviewer_decision_choices():
Review decision options presented to a Reviewer.
"""
return (
(None, '-----------'),
(RD.DECISION_ACCEPT.value, 'Accept Without Revisions'),
(RD.DECISION_MINOR.value, 'Minor Revisions Required'),
(RD.DECISION_MAJOR.value, 'Major Revisions Required'),
Expand Down
20 changes: 20 additions & 0 deletions src/review/tests.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@ def test_review_assignment_form_bad_reviewer(self):
)
self.assertFalse(form.is_valid())

def test_reviewer_decision_form_no_decision(self):
article = helpers.create_article(self.journal_one,
**{'owner': self.regular_user,
'title': 'Test Article',
'stage': submission_models.STAGE_UNDER_REVIEW})
round, c = review_models.ReviewRound.objects.get_or_create(article=article, round_number=1,)

data = {'reviewer': str(self.regular_user.id), 'form': '36', 'visibility': 'double-blind', 'date_due': '2024-03-13'}
form = forms.ReviewAssignmentForm(data,
journal=self.journal_one,
article=article,
editor=self.editor,
reviewers=[],)

assignment = form.save()
form = forms.ReviewerDecisionForm(instance=assignment, decision_required=True)

self.assertIn("<option value=\"\" selected>-----------</option>", form.as_p())
self.assertFalse(form.is_valid())

def test_csv_reviewer_import_good(self):
# create a fake request object
request = self.setup_request_object()
Expand Down