From d05f016632252e0d1e97b7c27fdfeb5e8bb5edb7 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Fri, 12 Apr 2024 18:00:06 -0400 Subject: [PATCH] comment --- src/registrar/forms/domain.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index 165d32fd8..b7c37277c 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -181,6 +181,9 @@ class BaseNameserverFormset(forms.BaseFormSet): for index, form in enumerate(self.forms): if form.cleaned_data: 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): form.add_error( "server",