Update domain_request.py

This commit is contained in:
zandercymatics 2024-10-30 14:27:04 -06:00
parent dfb59a6a9d
commit 4f1febf248
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -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 ## #
#