From 9f46849729c159d292e12270543bfb343b3e73b8 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 30 Jun 2022 13:34:40 +0200 Subject: [PATCH] Fix: API formsemestre --- app/api/etudiants.py | 4 +++- app/api/formsemestres.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/api/etudiants.py b/app/api/etudiants.py index a193553fa..4649a6698 100644 --- a/app/api/etudiants.py +++ b/app/api/etudiants.py @@ -230,7 +230,9 @@ def etudiant_formsemestres(etudid: int = None, nip: int = None, ine: int = None) formsemestres = query.order_by(FormSemestre.date_debut) - return jsonify([formsemestre.to_dict() for formsemestre in formsemestres]) + return jsonify( + [formsemestre.to_dict(convert_parcours=True) for formsemestre in formsemestres] + ) @bp.route( diff --git a/app/api/formsemestres.py b/app/api/formsemestres.py index be7bf1e0a..139b35ef1 100644 --- a/app/api/formsemestres.py +++ b/app/api/formsemestres.py @@ -84,7 +84,9 @@ def formsemestre_apo(etape_apo: str): FormSemestreEtape.formsemestre_id == FormSemestre.id, ) - return jsonify([formsemestre.to_dict() for formsemestre in formsemestres]) + return jsonify( + [formsemestre.to_dict(convert_parcours=True) for formsemestre in formsemestres] + ) @bp.route("/formsemestre//bulletins", methods=["GET"])