Skip to content

Commit

Permalink
Add bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zandercymatics committed Feb 29, 2024
1 parent dc34ee6 commit c17f248
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/registrar/utility/csv_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,12 @@ def write_csv(
max_dm_count = max(len(domain_info.domain.permissions.all()) for domain_info in all_domain_infos)
update_columns_with_domain_managers(columns, max_dm_count)

if should_write_header:
write_header(writer, columns)

for page_num in paginator.page_range:
page = paginator.page(page_num)
rows = []
page = paginator.page(page_num)
for domain_info in page.object_list:
try:
row = parse_row(columns, domain_info, security_emails_dict, get_domain_managers)
Expand All @@ -180,10 +183,7 @@ def write_csv(
logger.error("csv_export -> Error when parsing row, domain was None")
continue

if should_write_header:
write_header(writer, columns)

writer.writerows(rows)
writer.writerows(rows)


def export_data_type_to_csv(csv_file):
Expand Down

0 comments on commit c17f248

Please sign in to comment.