mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-30 13:03:14 +02:00
Add enum for email defaults
This commit is contained in:
parent
abb4bd8a3f
commit
023e150597
5 changed files with 27 additions and 7 deletions
|
@ -8,6 +8,8 @@ from django.db.models import Value
|
|||
from django.db.models.functions import Coalesce
|
||||
from django.utils import timezone
|
||||
|
||||
from registrar.utility.enums import DefaultEmail
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -38,7 +40,7 @@ def write_row(writer, columns, domain_info):
|
|||
if security_contacts:
|
||||
security_email = security_contacts[0].email
|
||||
|
||||
invalid_emails = {"registrar@dotgov.gov", "dotgov@cisa.dhs.gov"}
|
||||
invalid_emails = {DefaultEmail.LEGACY_DEFAULT, DefaultEmail.PUBLIC_CONTACT_DEFAULT}
|
||||
# These are default emails that should not be displayed in the csv report
|
||||
if security_email is not None and security_email.lower() in invalid_emails:
|
||||
security_email = "(blank)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue