mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-28 16:29:54 +02:00
Update for organization to have election
This commit is contained in:
parent
6637c0f9b1
commit
6c82ec9dc2
2 changed files with 11 additions and 2 deletions
|
@ -215,6 +215,14 @@ class DomainRequest(TimeStampedModel):
|
||||||
}
|
}
|
||||||
return org_election_map
|
return org_election_map
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_org_label(cls, org_name: str):
|
||||||
|
# Translating the key that is given to the direct readable value
|
||||||
|
if not org_name:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return cls(org_name).label if org_name else None
|
||||||
|
|
||||||
class OrganizationChoicesVerbose(models.TextChoices):
|
class OrganizationChoicesVerbose(models.TextChoices):
|
||||||
"""
|
"""
|
||||||
Tertiary organization choices
|
Tertiary organization choices
|
||||||
|
|
|
@ -374,8 +374,9 @@ class DomainExport(BaseExport):
|
||||||
if first_ready_on is None:
|
if first_ready_on is None:
|
||||||
first_ready_on = "(blank)"
|
first_ready_on = "(blank)"
|
||||||
|
|
||||||
domain_org_type = model.get("generic_org_type")
|
# organization_type has generic_org_type AND is_election
|
||||||
human_readable_domain_org_type = DomainRequest.OrganizationChoices.get_org_label(domain_org_type)
|
domain_org_type = model.get("organization_type")
|
||||||
|
human_readable_domain_org_type = DomainRequest.OrgChoicesElectionOffice.get_org_label(domain_org_type)
|
||||||
domain_federal_type = model.get("federal_type")
|
domain_federal_type = model.get("federal_type")
|
||||||
human_readable_domain_federal_type = BranchChoices.get_branch_label(domain_federal_type)
|
human_readable_domain_federal_type = BranchChoices.get_branch_label(domain_federal_type)
|
||||||
domain_type = human_readable_domain_org_type
|
domain_type = human_readable_domain_org_type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue