From 557e82345852c21bfde49af51d49ee41a558b352 Mon Sep 17 00:00:00 2001 From: rikuke <33894149+rikuke@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:21:39 +0300 Subject: [PATCH] fix: only one row per application in Talpa CSV export (#2289) --- .../benefit/applications/services/applications_csv_report.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/benefit/applications/services/applications_csv_report.py b/backend/benefit/applications/services/applications_csv_report.py index dbfba7f204..b18f2370bf 100644 --- a/backend/benefit/applications/services/applications_csv_report.py +++ b/backend/benefit/applications/services/applications_csv_report.py @@ -391,6 +391,11 @@ def get_row_items(self): for application in self.get_applications(): # for applications with multiple ahjo rows, output the same number of rows. # If no Ahjo rows (calculation incomplete), always output just one row. + if self.prune_data_for_talpa: + # For Talpa, only one row per application is needed + application.application_row_idx = 1 + yield application + continue for application_row_idx, unused in enumerate( application.ahjo_rows or [None] ):