Skip to content

Commit

Permalink
Merge pull request #3311 from drjova/remove-validation-from-authors f…
Browse files Browse the repository at this point in the history
…orms: remove validation for duplicate ORCIDs
  • Loading branch information
ammirate authored and puntonim committed Apr 5, 2018
2 parents 075df91 + 3dbd0bb commit f611fb8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inspirehep/modules/authors/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,12 @@ def __init__(self, *args, **kwargs):
"""Constructor."""
super(AuthorUpdateForm, self).__init__(*args, **kwargs)
is_review = kwargs.pop('is_review', False)
is_update = kwargs.pop('is_update', False)

if is_update:
# remove validation for duplicate ORCIDs on update
self.orcid.validators = self.orcid.validators[:-1]

if is_review:
self.bai.widget = TextInput()
self.bai.flags = Flags()
Expand Down

0 comments on commit f611fb8

Please sign in to comment.