mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 10:07:04 +02:00
Fixed form state check
This commit is contained in:
parent
377cb30818
commit
c5b841f6fb
2 changed files with 5 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue