Skip to content
Snippets Groups Projects
Unverified Commit c3f13245 authored by Frank Duncan's avatar Frank Duncan Committed by GitHub
Browse files

Remove None reviewers from validation (#4021)

Fixes #4020

This was caused by an issue where the "---" (None) reviewers were
causing the validation to fail, meaning that you had to fill out n-1
reviewers in the submission page in order for the save to go through.

The solution was to only check for duplicates with reviewers that were
selected.
parent 7db45090
No related branches found
No related tags found
1 merge request!98Merge 5.15.0 into ardc-main
......@@ -270,7 +270,7 @@ class UpdateReviewersForm(ApplicationSubmissionModelForm):
role_reviewers = [
user
for field, user in self.cleaned_data.items()
if field in self.role_fields
if field in self.role_fields and user
]
for field, role in self.role_fields.items():
......@@ -396,7 +396,7 @@ class BatchUpdateReviewersForm(forms.Form):
role_reviewers = [
user
for field, user in self.cleaned_data.items()
if field in self.role_fields
if field in self.role_fields and user
]
# If any of the users match and are set to multiple roles, throw an error
......
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