diff --git a/src/registrar/forms/domain_request_wizard.py b/src/registrar/forms/domain_request_wizard.py index 4992703d3..19e994c90 100644 --- a/src/registrar/forms/domain_request_wizard.py +++ b/src/registrar/forms/domain_request_wizard.py @@ -685,9 +685,9 @@ class CisaRepresentativeForm(BaseDeletableRegistrarForm): email = forms.EmailField( label="Email", max_length=None, + required=False, error_messages={ "invalid": ("Enter your email address in the required format, like name@example.com."), - "required": ("Enter the email address of your CISA regional representative."), }, validators=[ MaxLengthValidator( diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py index a1668a6c8..cad599439 100644 --- a/src/registrar/models/domain_request.py +++ b/src/registrar/models/domain_request.py @@ -538,15 +538,16 @@ class DomainRequest(TimeStampedModel): """ cisa_rep_is_not_none = self.cisa_representative is not None - logger.debug("CISA REPRESENTATIVE IS %s" % cisa_rep_is_not_none) + cisa_first_name = None # This ensures that if we have prefilled data, the form is prepopulated if cisa_rep_is_not_none: - self.has_cisa_representative = True + cisa_first_name = self.cisa_representative.first_name + self.has_cisa_representative = cisa_first_name is not None and cisa_first_name != "" # This check is required to ensure that the form doesn't start out checked if self.has_cisa_representative is not None: - self.has_cisa_representative = cisa_rep_is_not_none + self.has_cisa_representative = cisa_first_name is not None and cisa_first_name != "" # This ensures that if we have prefilled data, the form is prepopulated if self.anything_else is not None: