mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 06:56:33 +02:00
add comments
This commit is contained in:
parent
bb9cb527d2
commit
98842c1aa0
2 changed files with 7 additions and 3 deletions
|
@ -594,16 +594,19 @@ class RequestingEntity(DomainRequestWizard):
|
|||
"""Override of save to clear or associate certain suborganization data
|
||||
depending on what the user wishes to do. For instance, we want to add a suborganization
|
||||
if the user selects one."""
|
||||
yesno_form = forms[0]
|
||||
requesting_entity_form = forms[1]
|
||||
|
||||
# Get the yes/no dropdown value
|
||||
yesno_form = forms[0]
|
||||
yesno_cleaned_data = yesno_form.cleaned_data
|
||||
requesting_entity_is_suborganization = yesno_cleaned_data.get("requesting_entity_is_suborganization")
|
||||
|
||||
# Get the suborg value, and the requested suborg value
|
||||
requesting_entity_form = forms[1]
|
||||
cleaned_data = requesting_entity_form.cleaned_data
|
||||
sub_organization = cleaned_data.get("sub_organization")
|
||||
requested_suborganization = cleaned_data.get("requested_suborganization")
|
||||
|
||||
# Do some data cleanup, depending on what option was checked
|
||||
if requesting_entity_is_suborganization and (sub_organization or requested_suborganization):
|
||||
# Cleanup the organization name field, as this isn't for suborganizations.
|
||||
requesting_entity_form.cleaned_data.update({"organization_name": None})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue