mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 00:12:16 +02:00
Add fix for security email
This commit is contained in:
parent
19f6e3ef8b
commit
3e91f9790c
1 changed files with 11 additions and 1 deletions
|
@ -19,6 +19,16 @@ def export_domains_to_writer(writer, columns, sort_fields, filter_condition):
|
|||
first_name = domainInfo.authorizing_official.first_name or ""
|
||||
last_name = domainInfo.authorizing_official.last_name or ""
|
||||
ao = first_name + " " + last_name
|
||||
|
||||
security_email = " "
|
||||
if security_contacts:
|
||||
security_email = security_contacts[0].email
|
||||
|
||||
# These are default emails that should not be displayed in the csv report
|
||||
disallowed_emails = ["registrar@dotgov.gov"]
|
||||
if security_email and security_email.lower() in disallowed_emails:
|
||||
security_email = "(blank)"
|
||||
|
||||
# create a dictionary of fields which can be included in output
|
||||
FIELDS = {
|
||||
"Domain name": domainInfo.domain.name,
|
||||
|
@ -31,7 +41,7 @@ def export_domains_to_writer(writer, columns, sort_fields, filter_condition):
|
|||
"State": domainInfo.state_territory,
|
||||
"AO": ao,
|
||||
"AO email": domainInfo.authorizing_official.email if domainInfo.authorizing_official else " ",
|
||||
"Security Contact Email": security_contacts[0].email if security_contacts else " ",
|
||||
"Security Contact Email": security_email,
|
||||
"Status": domainInfo.domain.state,
|
||||
"Expiration Date": domainInfo.domain.expiration_date,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue