mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
Cleanup pt 2
This commit is contained in:
parent
ba025f2c6a
commit
33efd7c2c1
2 changed files with 4 additions and 6 deletions
|
@ -681,7 +681,7 @@ class ExportDataTest(MockDb, MockEppLib):
|
|||
}
|
||||
|
||||
all_requests = DomainRequest.objects.filter(**filter_condition).order_by(*sort_fields).distinct()
|
||||
extra = all_requests.values("requested_domain_name", "generic_org_type", "federal_type", "submission_date")
|
||||
extra = all_requests.values("generic_org_type", "federal_type", "submission_date")
|
||||
DomainRequestExport.write_csv_for_requests(
|
||||
writer, columns, all_requests, extra_request_fields=extra, should_write_header=True
|
||||
)
|
||||
|
|
|
@ -748,7 +748,7 @@ class DomainRequestExport:
|
|||
writer.writerows(total_body_rows)
|
||||
|
||||
@staticmethod
|
||||
def parse_row_for_requests(columns, request: DomainRequest, extra_fields: QuerySet):
|
||||
def parse_row_for_requests(columns, request: DomainRequest, extra_fields: dict):
|
||||
"""
|
||||
Given a set of columns and a request dictionary,
|
||||
generate a new row from cleaned column data
|
||||
|
@ -849,10 +849,8 @@ class DomainRequestExport:
|
|||
|
||||
all_requests = DomainRequest.objects.filter(**filter_condition).order_by(*sort_fields).distinct()
|
||||
|
||||
# Convert the request to a querystring for faster processing. Only grab what we need.
|
||||
annotations = all_requests.annotate(
|
||||
requested_domain_name=DomainRequestExport.get_requested_domain_name_query(),
|
||||
).values("requested_domain_name", "generic_org_type", "federal_type", "submission_date")
|
||||
# Convert the request to a querystring. Only grab what we need.
|
||||
annotations = all_requests.values("generic_org_type", "federal_type", "submission_date")
|
||||
|
||||
# Override the default value for domain_type
|
||||
for request in annotations:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue