mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 23:16:36 +02:00
linted
This commit is contained in:
parent
bf34df52dd
commit
e7c22ce51f
6 changed files with 13 additions and 27 deletions
|
@ -198,8 +198,8 @@ class BaseExport(ABC):
|
|||
|
||||
# We can infer that if we're passing in annotations,
|
||||
# we want to grab the result of said annotation.
|
||||
if computed_fields :
|
||||
related_table_fields.extend(computed_fields .keys())
|
||||
if computed_fields:
|
||||
related_table_fields.extend(computed_fields.keys())
|
||||
|
||||
# Get prexisting fields on the model
|
||||
model_fields = set()
|
||||
|
@ -213,26 +213,6 @@ class BaseExport(ABC):
|
|||
|
||||
return cls.update_queryset(queryset, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def export_data_to_csv(cls, csv_file, **kwargs):
|
||||
"""
|
||||
All domain metadata:
|
||||
Exports domains of all statuses plus domain managers.
|
||||
"""
|
||||
|
||||
writer = csv.writer(csv_file)
|
||||
columns = cls.get_columns()
|
||||
models_dict = cls.get_model_annotation_dict(**kwargs)
|
||||
|
||||
# Write to csv file before the write_csv
|
||||
cls.write_csv_before(writer, **kwargs)
|
||||
|
||||
# Write the csv file
|
||||
rows = cls.write_csv(writer, columns, models_dict)
|
||||
|
||||
# Return rows that for easier parsing and testing
|
||||
return rows
|
||||
|
||||
@classmethod
|
||||
def get_annotated_queryset(cls, **kwargs):
|
||||
"""Returns an annotated queryset based off of all query conditions."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue