Cleanup. Admin updates

This commit is contained in:
CocoByte 2024-04-11 15:46:04 -06:00
parent 44c74c7c86
commit 9d872d065c
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
6 changed files with 32 additions and 26 deletions

View file

@ -644,12 +644,14 @@ class DomainRequest(TimeStampedModel):
null=True,
blank=True,
help_text="Anything else?",
verbose_name="Additional Details",
)
cisa_representative_email = models.EmailField(
null=True,
blank=True,
db_index=True,
verbose_name="CISA region representative",
)
is_policy_acknowledged = models.BooleanField(
@ -1045,6 +1047,9 @@ class DomainRequest(TimeStampedModel):
def has_cisa_representative(self) -> bool:
"""Does this domain request have cisa representative?"""
return self.cisa_representative_email != "" and self.cisa_representative_email is not None
def has_additional_details(self) -> bool:
return self.has_anything_else_text() or self.has_cisa_representative()
def is_federal(self) -> Union[bool, None]:
"""Is this domain request for a federal agency?