From 6440ca4a1fcd359ffc461c0a066da1c48473fa27 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 18 Dec 2022 20:26:17 -0300 Subject: [PATCH] Fix API: formsemestres_courants --- app/api/departements.py | 4 ++-- app/models/formsemestre.py | 1 + sco_version.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/api/departements.py b/app/api/departements.py index d9b871b89..0782453c1 100644 --- a/app/api/departements.py +++ b/app/api/departements.py @@ -269,7 +269,7 @@ def dept_formsemestres_courants(acronym: str): FormSemestre.date_debut <= test_date, FormSemestre.date_fin >= test_date, ) - return jsonify([d.to_dict(convert_objects=True) for d in formsemestres]) + return jsonify([d.to_dict_api() for d in formsemestres]) @bp.route("/departement/id//formsemestres_courants") @@ -294,4 +294,4 @@ def dept_formsemestres_courants_by_id(dept_id: int): FormSemestre.date_fin >= test_date, ) - return jsonify([d.to_dict(convert_objects=True) for d in formsemestres]) + return jsonify([d.to_dict_api() for d in formsemestres]) diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 1da6feffb..7ff093cd4 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -206,6 +206,7 @@ class FormSemestre(db.Model): d["parcours"] = [p.to_dict() for p in self.get_parcours_apc()] d["responsables"] = [u.id for u in self.responsables] d["titre_court"] = self.formation.acronyme + d["titre_formation"] = self.titre_formation() d["titre_num"] = self.titre_num() d["session_id"] = self.session_id() return d diff --git a/sco_version.py b/sco_version.py index 3a642d888..7db68e86c 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.4.16" +SCOVERSION = "9.4.17" SCONAME = "ScoDoc"