From 9622817037ff3a9832e411eab7d2267ef652cdf4 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Thu, 29 Feb 2024 21:23:43 -0500 Subject: [PATCH] test for should_write_header --- src/registrar/utility/csv_export.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py index 340e49904..ef531ee60 100644 --- a/src/registrar/utility/csv_export.py +++ b/src/registrar/utility/csv_export.py @@ -187,7 +187,8 @@ def write_csv( total_body_rows.append(rows) update_columns_with_domain_managers(columns, max_dm_count) - write_header(writer, columns) + if should_write_header: + write_header(writer, columns) writer.writerows(total_body_rows) @@ -220,7 +221,7 @@ def export_data_type_to_csv(csv_file): ] filter_condition = { "domain__state__in": [ - Domain.State.UNKNOWN, + Domain.State.READY, Domain.State.DNS_NEEDED, Domain.State.ON_HOLD, ],