fix unlocking steps

This commit is contained in:
zandercymatics 2024-10-23 12:52:42 -06:00
parent 888d77bf96
commit 514cd8af31
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 5 additions and 7 deletions

View file

@ -83,7 +83,6 @@ class RequestingEntityForm(RegistrarForm):
# Remove the custom other field before cleaning
data = self.data.copy() if self.data else None
suborganization = self.data.get('portfolio_requesting_entity-sub_organization')
is_suborganization = self.data.get("portfolio_requesting_entity-is_suborganization")
if suborganization:
if "other" in data['portfolio_requesting_entity-sub_organization']:
# Remove the 'other' value

View file

@ -261,7 +261,6 @@ class BaseYesNoForm(RegistrarForm):
"required": self.required_error_message,
},
)
print(f"here are the form choices: {self.form_choices}, here is the initial: {self.get_initial_value()}")
return choice_field

View file

@ -1208,6 +1208,7 @@ class DomainRequest(TimeStampedModel):
if self.has_information_required_to_make_suborganization():
return True
return False
def is_custom_suborganization(self) -> bool:
@ -1219,11 +1220,10 @@ class DomainRequest(TimeStampedModel):
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"""
return (
self.requested_domain 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
def to_dict(self):
"""This is to process to_dict for Domain Information, making it friendly