mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-21 20:09:23 +02:00
Bug fix
This commit is contained in:
parent
75e687f13b
commit
acbef25ec1
1 changed files with 4 additions and 3 deletions
|
@ -60,9 +60,10 @@ def parse_row(columns, domain_info: DomainInformation, security_emails_dict=None
|
||||||
else:
|
else:
|
||||||
# If the dictionary doesn't contain that data, lets filter for it manually.
|
# If the dictionary doesn't contain that data, lets filter for it manually.
|
||||||
# This is a last resort as this is a more expensive operation.
|
# This is a last resort as this is a more expensive operation.
|
||||||
security_contacts = domain_info.domain.contacts.filter(contact_type=PublicContact.ContactTypeChoices.SECURITY)
|
security_contacts = domain.contacts.filter(contact_type=PublicContact.ContactTypeChoices.SECURITY)
|
||||||
_email = security_contacts[0].email
|
_email = security_contacts[0].email if security_contacts else None
|
||||||
security_email = _email if _email is not None else " "
|
security_email = _email if _email is not None else " "
|
||||||
|
print("in else statement....")
|
||||||
|
|
||||||
# These are default emails that should not be displayed in the csv report
|
# These are default emails that should not be displayed in the csv report
|
||||||
invalid_emails = {"registrar@dotgov.gov", "dotgov@cisa.dhs.gov"}
|
invalid_emails = {"registrar@dotgov.gov", "dotgov@cisa.dhs.gov"}
|
||||||
|
@ -117,7 +118,7 @@ def write_body(
|
||||||
|
|
||||||
# Populate a dictionary of domain names and their security contacts
|
# Populate a dictionary of domain names and their security contacts
|
||||||
for contact in public_contacts:
|
for contact in public_contacts:
|
||||||
domain: Domain = domain_info.domain
|
domain: Domain = contact.domain
|
||||||
if domain is not None and domain.name not in security_emails_dict:
|
if domain is not None and domain.name not in security_emails_dict:
|
||||||
security_emails_dict[domain.name] = contact.email
|
security_emails_dict[domain.name] = contact.email
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue