mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 18:09:25 +02:00
Fix stealthy bug
This commit is contained in:
parent
194accd90e
commit
48b36a9189
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ class DomainRequest(TimeStampedModel):
|
|||
@classmethod
|
||||
def get_org_label(cls, org_name: str):
|
||||
"""Returns the associated label for a given org name"""
|
||||
org_names = org_name.split("_election")
|
||||
if len(org_names) > 0:
|
||||
org_name = org_names[0]
|
||||
return cls(org_name).label if org_name else None
|
||||
|
||||
class OrgChoicesElectionOffice(models.TextChoices):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue