mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 04:58:42 +02:00
Fix unit tests
This commit is contained in:
parent
ad79557a55
commit
0478d2bee6
6 changed files with 97 additions and 53 deletions
|
@ -1300,8 +1300,6 @@ class DomainRequest(TimeStampedModel):
|
|||
.filter(agency=self.federal_agency)
|
||||
.exists()
|
||||
)
|
||||
|
||||
# NOTE: Shouldn't this be an AND on all required fields?
|
||||
return (
|
||||
self.federal_agency is not None
|
||||
or self.organization_name is not None
|
||||
|
@ -1312,6 +1310,17 @@ class DomainRequest(TimeStampedModel):
|
|||
or self.urbanization is not None
|
||||
)
|
||||
|
||||
def unlock_other_contacts(self) -> bool:
|
||||
"""Unlocks the other contacts step"""
|
||||
other_contacts_filled_out = self.other_contacts.filter(
|
||||
first_name__isnull=False,
|
||||
last_name__isnull=False,
|
||||
title__isnull=False,
|
||||
email__isnull=False,
|
||||
phone__isnull=False,
|
||||
).exists()
|
||||
return (self.has_other_contacts() and other_contacts_filled_out) or self.no_other_contacts_rationale is not None
|
||||
|
||||
# ## Form policies ## #
|
||||
#
|
||||
# These methods control what questions need to be answered by applicants
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue