mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 02:36:02 +02:00
Exclude default emails from current-csv, add unit test
This commit is contained in:
parent
ac4dbd1a64
commit
bf2dfccac5
3 changed files with 102 additions and 3 deletions
|
@ -24,8 +24,9 @@ def export_domains_to_writer(writer, columns, sort_fields, filter_condition):
|
|||
if security_contacts:
|
||||
security_email = security_contacts[0].email
|
||||
|
||||
invalid_emails = {"registrar@dotgov.gov", "dotgov@cisa.dhs.gov"}
|
||||
# These are default emails that should not be displayed in the csv report
|
||||
if security_email is not None and security_email.lower() == "registrar@dotgov.gov":
|
||||
if security_email is not None and security_email.lower() in invalid_emails:
|
||||
security_email = "(blank)"
|
||||
|
||||
# create a dictionary of fields which can be included in output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue