mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 10:07:04 +02:00
Update domain_request.py
This commit is contained in:
parent
dfb59a6a9d
commit
4f1febf248
1 changed files with 9 additions and 4 deletions
|
@ -1127,7 +1127,10 @@ class DomainRequest(TimeStampedModel):
|
|||
|
||||
def requesting_entity_is_portfolio(self) -> bool:
|
||||
"""Determines if this record is requesting that a portfolio be their organization."""
|
||||
return self.portfolio and self.organization_name == self.portfolio.organization_name
|
||||
if self.portfolio and self.organization_name == self.portfolio.organization_name:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def requesting_entity_is_suborganization(self) -> bool:
|
||||
"""Used to determine if this domain request is also requesting that it be tied to a suborganization.
|
||||
|
@ -1152,9 +1155,11 @@ class DomainRequest(TimeStampedModel):
|
|||
# If a suborganization already exists, it can't possibly be a new one
|
||||
if self.sub_organization:
|
||||
return False
|
||||
return bool(
|
||||
self.requested_suborganization and self.suborganization_city and self.suborganization_state_territory
|
||||
)
|
||||
|
||||
if self.requested_suborganization and self.suborganization_city and self.suborganization_state_territory:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
# ## Form unlocking steps ## #
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue