Merge branch 'main' into za/1901-allow-analysts-to-customize-action-needed-emails

This commit is contained in:
zandercymatics 2024-07-16 08:12:18 -06:00
commit 35c8a57aa3
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
53 changed files with 2346 additions and 2403 deletions

View file

@ -135,6 +135,13 @@ class DomainRequest(TimeStampedModel):
@classmethod
def get_org_label(cls, org_name: str):
"""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")
if len(org_names) > 0:
org_name = org_names[0]