mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-15 14:04:10 +02:00
Merge branch 'main' of github.com:cisagov/manage.get.gov into es/2398-sandbox-deploy-workflow
This commit is contained in:
commit
9f22184857
1 changed files with 7 additions and 0 deletions
|
@ -136,6 +136,13 @@ class DomainRequest(TimeStampedModel):
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_org_label(cls, org_name: str):
|
def get_org_label(cls, org_name: str):
|
||||||
"""Returns the associated label for a given org name"""
|
"""Returns the associated label for a given org name"""
|
||||||
|
# This is an edgecase on domains with no org.
|
||||||
|
# This unlikely to happen but
|
||||||
|
# a break will occur in certain edge cases without this.
|
||||||
|
# (more specifically, csv exports).
|
||||||
|
if not org_name:
|
||||||
|
return None
|
||||||
|
|
||||||
org_names = org_name.split("_election")
|
org_names = org_name.split("_election")
|
||||||
if len(org_names) > 0:
|
if len(org_names) > 0:
|
||||||
org_name = org_names[0]
|
org_name = org_names[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue