From a4380618d0607e8d0a272ef75402bdacf316cac0 Mon Sep 17 00:00:00 2001 From: Juho Kettunen Date: Wed, 14 Aug 2024 15:52:17 +0300 Subject: [PATCH] properly split query parameter for email (#511) Service unit query parameter was previously sent as single string like "1,2,3,4", which is not a proper input for forms.ModelMultipleChoiceField. Synchronous reports already handled this query string properly, so now email reports use the same query parameter parsing for service unit. --- src/leaseStatisticReport/requests.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/leaseStatisticReport/requests.ts b/src/leaseStatisticReport/requests.ts index de73f1fc5..7acfe8028 100644 --- a/src/leaseStatisticReport/requests.ts +++ b/src/leaseStatisticReport/requests.ts @@ -23,10 +23,11 @@ export const fetchReportData = (payload: Record): Generator): Generator => { - return callApi(new Request(`${payload.url}?${payload.query}`)); + const parsedQuery = parseServiceUnitQuery(payload.query) || ''; + return callApi(new Request(`${payload.url}?${parsedQuery}`)); }; export const fetchOptions = (payload: any): Generator => { return callApi(new Request(payload, { method: 'OPTIONS' })); -}; \ No newline at end of file +};