Validation logic

This commit is contained in:
zandercymatics 2024-10-23 12:46:18 -06:00
parent 860f8f4e3c
commit 888d77bf96
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 63 additions and 51 deletions

View file

@ -1210,6 +1210,12 @@ class DomainRequest(TimeStampedModel):
return True
return False
def is_custom_suborganization(self) -> bool:
if self.is_suborganization():
return not self.sub_organization and self.has_information_required_to_make_suborganization()
else:
return False
def has_information_required_to_make_suborganization(self):
"""Checks if we have all the information we need to create a new suborganization object.
Checks for a the existence of requested_suborganization, suborganization_city, suborganization_state_territory"""