Assiduites : api/assiduites/group bug fix flask_json

This commit is contained in:
iziram 2023-05-29 11:32:46 +02:00
parent bdfa1d3311
commit a85997f9b8

View File

@ -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