Display logic in admin

This commit is contained in:
zandercymatics 2024-08-22 14:11:28 -06:00
parent 056a3ecf36
commit 7fb186e24b
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 38 additions and 0 deletions

View file

@ -577,6 +577,18 @@ class DomainRequest(TimeStampedModel):
blank=True,
)
@classmethod
def get_statuses_that_send_emails(cls):
"""Returns a list of statuses that send an email to the user"""
excluded_statuses = [
cls.DomainRequestStatus.INELIGIBLE,
cls.DomainRequestStatus.IN_REVIEW
]
return [
status for status in cls.DomainRequestStatus
if status not in excluded_statuses
]
def sync_organization_type(self):
"""
Updates the organization_type (without saving) to match