From ed8031a2378544b577b8c0f3df66114f6180538f Mon Sep 17 00:00:00 2001 From: kovacspe Date: Sat, 11 Nov 2023 11:54:09 +0100 Subject: [PATCH] Use writerows --- competition/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/competition/views.py b/competition/views.py index e4e35c55..9420ba66 100644 --- a/competition/views.py +++ b/competition/views.py @@ -704,8 +704,7 @@ def participants_export(self, request, pk=None): header = ProfileExportSerializer.Meta.fields writer = csv.DictWriter(response, fieldnames=header) writer.writeheader() - for row in serializer.data: - writer.writerow(row) + writer.writerows(serializer.data) return response def post(self, request, format_post):