Merge conflicts

This commit is contained in:
zandercymatics 2024-06-12 08:44:03 -06:00
parent 8d249692f2
commit 836b190822
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 9 additions and 7 deletions

View file

@ -248,11 +248,6 @@ class DomainRequest(TimeStampedModel):
"School district: a school district that is not part of a local government", "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): class RejectionReasons(models.TextChoices):
DOMAIN_PURPOSE = "purpose_not_met", "Purpose requirements not met" DOMAIN_PURPOSE = "purpose_not_met", "Purpose requirements not met"
REQUESTOR = "requestor_not_eligible", "Requestor not eligible to make request" REQUESTOR = "requestor_not_eligible", "Requestor not eligible to make request"

View file

@ -5,3 +5,8 @@ class BranchChoices(models.TextChoices):
EXECUTIVE = "executive", "Executive" EXECUTIVE = "executive", "Executive"
JUDICIAL = "judicial", "Judicial" JUDICIAL = "judicial", "Judicial"
LEGISLATIVE = "legislative", "Legislative" 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

View file

@ -18,6 +18,8 @@ from django.contrib.postgres.aggregates import StringAgg
from registrar.models.utility.generic_helper import convert_queryset_to_dict from registrar.models.utility.generic_helper import convert_queryset_to_dict
from registrar.templatetags.custom_filters import get_region from registrar.templatetags.custom_filters import get_region
from registrar.utility.enums import DefaultEmail from registrar.utility.enums import DefaultEmail
from registrar.utility.constants import BranchChoices
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -893,11 +895,11 @@ class DomainRequestExport:
# Handle the federal_type field. Defaults to the wrong format. # Handle the federal_type field. Defaults to the wrong format.
federal_type = request.get("federal_type") federal_type = request.get("federal_type")
human_readable_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 # 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 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. # Handle the status field. Defaults to the wrong format.