From 86dbe6b6a0b7c231ad7b718378900febd162ad35 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:40:03 -0700 Subject: [PATCH] Update csv_export.py --- src/registrar/utility/csv_export.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py index 55bb0af3c..6b5b64a7f 100644 --- a/src/registrar/utility/csv_export.py +++ b/src/registrar/utility/csv_export.py @@ -13,7 +13,9 @@ def export_domains_to_writer(writer, columns, sort_fields, filter_condition): domainInfos = DomainInformation.objects.filter(**filter_condition).order_by(*sort_fields) for domainInfo in domainInfos: security_contacts = domainInfo.domain.contacts.filter(contact_type=PublicContact.ContactTypeChoices.SECURITY) - + ao = ( + (domainInfo.authorizing_official.first_name or "") + " " + (domainInfo.authorizing_official.last_name or "") + ) # create a dictionary of fields which can be included in output FIELDS = { "Domain name": domainInfo.domain.name, @@ -24,9 +26,7 @@ def export_domains_to_writer(writer, columns, sort_fields, filter_condition): "Organization name": domainInfo.organization_name, "City": domainInfo.city, "State": domainInfo.state_territory, - "AO": (domainInfo.authorizing_official.first_name or "") + " " + (domainInfo.authorizing_official.last_name or "") - if domainInfo.authorizing_official - else " ", + "AO": ao if domainInfo.authorizing_official else " ", "AO email": domainInfo.authorizing_official.email if domainInfo.authorizing_official else " ", "Security Contact Email": security_contacts[0].email if security_contacts else " ", "Status": domainInfo.domain.state,