mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-30 00:03:30 +02:00
comment
This commit is contained in:
parent
27ef823b93
commit
d05f016632
1 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,9 @@ class BaseNameserverFormset(forms.BaseFormSet):
|
||||||
for index, form in enumerate(self.forms):
|
for index, form in enumerate(self.forms):
|
||||||
if form.cleaned_data:
|
if form.cleaned_data:
|
||||||
value = form.cleaned_data["server"]
|
value = form.cleaned_data["server"]
|
||||||
|
# We need to make sure not to trigger the duplicate error in case the first and second nameservers are empty
|
||||||
|
# If there are enough records in the formset, that error is an unecessary blocker. If there aren't, the required
|
||||||
|
# error will block the submit.
|
||||||
if value in data and not (form.cleaned_data.get("server", "").strip() == '' and index == 1):
|
if value in data and not (form.cleaned_data.get("server", "").strip() == '' and index == 1):
|
||||||
form.add_error(
|
form.add_error(
|
||||||
"server",
|
"server",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue