mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +02:00
Update generic_helper.py
This commit is contained in:
parent
f73fe9f042
commit
9a87d24d6e
1 changed files with 7 additions and 1 deletions
|
@ -189,7 +189,7 @@ class CreateOrUpdateOrganizationTypeHelper:
|
||||||
new_org = election_org_map[current_org_type]
|
new_org = election_org_map[current_org_type]
|
||||||
self.instance.generic_org_type = new_org
|
self.instance.generic_org_type = new_org
|
||||||
self.instance.is_election_board = True
|
self.instance.is_election_board = True
|
||||||
else:
|
elif self.instance.generic_org_type is not None:
|
||||||
self.instance.generic_org_type = current_org_type
|
self.instance.generic_org_type = current_org_type
|
||||||
|
|
||||||
# This basically checks if the given org type
|
# This basically checks if the given org type
|
||||||
|
@ -207,6 +207,12 @@ class CreateOrUpdateOrganizationTypeHelper:
|
||||||
f"cannot exist for {current_org_type}. Setting to None."
|
f"cannot exist for {current_org_type}. Setting to None."
|
||||||
)
|
)
|
||||||
self.instance.is_election_board = None
|
self.instance.is_election_board = None
|
||||||
|
else:
|
||||||
|
# if self.instance.organization_type is set to None, then this means
|
||||||
|
# we should clear the related fields.
|
||||||
|
# This will not occur if it just is None (i.e. default), only if it is set to be so.
|
||||||
|
self.instance.is_election_board = None
|
||||||
|
self.instance.generic_org_type = None
|
||||||
|
|
||||||
def _validate_new_instance(self):
|
def _validate_new_instance(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue