Updated Anything Else page to Additional Details page

This commit is contained in:
CocoByte 2024-04-10 16:20:57 -06:00
parent 6d13614521
commit 8f27aa1010
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
10 changed files with 314 additions and 71 deletions

View file

@ -566,6 +566,12 @@ class DomainRequest(TimeStampedModel):
help_text="Anything else?",
)
cisa_representative_email = models.EmailField(
null=True,
blank=True,
db_index=True,
)
is_policy_acknowledged = models.BooleanField(
null=True,
blank=True,
@ -923,6 +929,14 @@ class DomainRequest(TimeStampedModel):
def has_other_contacts(self) -> bool:
"""Does this domain request have other contacts listed?"""
return self.other_contacts.exists()
def has_anything_else_text(self) -> bool:
"""Does this domain request have an 'anything else?' entry"""
return self.anything_else != "" and self.anything_else != None #TODO-NL: how to handle falsy strings again?
def has_cisa_representative(self) -> bool:
"""Does this domain request have cisa representative?"""
return self.cisa_representative_email != "" and self.cisa_representative_email != None
def is_federal(self) -> Union[bool, None]:
"""Is this domain request for a federal agency?