mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
Merge conflicts
This commit is contained in:
parent
8d249692f2
commit
836b190822
3 changed files with 9 additions and 7 deletions
|
@ -248,11 +248,6 @@ class DomainRequest(TimeStampedModel):
|
|||
"School district: a school district that is not part of a local government",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_branch_label(cls, branch_name: str):
|
||||
"""Returns the associated label for a given org name"""
|
||||
return cls(branch_name).label if branch_name else None
|
||||
|
||||
class RejectionReasons(models.TextChoices):
|
||||
DOMAIN_PURPOSE = "purpose_not_met", "Purpose requirements not met"
|
||||
REQUESTOR = "requestor_not_eligible", "Requestor not eligible to make request"
|
||||
|
|
|
@ -5,3 +5,8 @@ class BranchChoices(models.TextChoices):
|
|||
EXECUTIVE = "executive", "Executive"
|
||||
JUDICIAL = "judicial", "Judicial"
|
||||
LEGISLATIVE = "legislative", "Legislative"
|
||||
|
||||
@classmethod
|
||||
def get_branch_label(cls, branch_name: str):
|
||||
"""Returns the associated label for a given org name"""
|
||||
return cls(branch_name).label if branch_name else None
|
||||
|
|
|
@ -18,6 +18,8 @@ from django.contrib.postgres.aggregates import StringAgg
|
|||
from registrar.models.utility.generic_helper import convert_queryset_to_dict
|
||||
from registrar.templatetags.custom_filters import get_region
|
||||
from registrar.utility.enums import DefaultEmail
|
||||
from registrar.utility.constants import BranchChoices
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -893,11 +895,11 @@ class DomainRequestExport:
|
|||
# Handle the federal_type field. Defaults to the wrong format.
|
||||
federal_type = request.get("federal_type")
|
||||
human_readable_federal_type = (
|
||||
DomainRequest.BranchChoices.get_branch_label(federal_type) if federal_type else None
|
||||
BranchChoices.get_branch_label(federal_type) if federal_type else None
|
||||
)
|
||||
|
||||
# Handle the org_type field
|
||||
org_type = request.get("organization_type")
|
||||
org_type = request.get("generic_org_type") or request.get("organization_type")
|
||||
human_readable_org_type = DomainRequest.OrganizationChoices.get_org_label(org_type) if org_type else None
|
||||
|
||||
# Handle the status field. Defaults to the wrong format.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue