From 54db0d70d5fb3b51901cbfb1b85f7fc4f3eccb51 Mon Sep 17 00:00:00 2001 From: iziram Date: Mon, 29 May 2023 11:32:46 +0200 Subject: [PATCH] Assiduites : api/assiduites/group bug fix flask_json --- app/api/assiduites.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/assiduites.py b/app/api/assiduites.py index 17ccf816c..044931b68 100644 --- a/app/api/assiduites.py +++ b/app/api/assiduites.py @@ -249,11 +249,10 @@ def assiduites_group(with_query: bool = False): if with_query: assiduites_query = _filter_manager(request, assiduites_query) - data_set: dict[list[dict]] = {key: [] for key in etuds} + data_set: dict[list[dict]] = {str(key): [] for key in etuds} for ass in assiduites_query.all(): data = ass.to_dict(format_api=True) - data_set.get(data["etudid"]).append(data) - + data_set.get(str(data["etudid"])).append(data) return data_set