forked from ScoDoc/ScoDoc
Assiduites : api/assiduites/group bug fix flask_json
This commit is contained in:
parent
fe80051573
commit
54db0d70d5
@ -249,11 +249,10 @@ def assiduites_group(with_query: bool = False):
|
|||||||
if with_query:
|
if with_query:
|
||||||
assiduites_query = _filter_manager(request, assiduites_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():
|
for ass in assiduites_query.all():
|
||||||
data = ass.to_dict(format_api=True)
|
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
|
return data_set
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user