forked from ScoDoc/ScoDoc
Fix API: formsemestres_courants
This commit is contained in:
parent
7d2d19f3a8
commit
6440ca4a1f
@ -269,7 +269,7 @@ def dept_formsemestres_courants(acronym: str):
|
|||||||
FormSemestre.date_debut <= test_date,
|
FormSemestre.date_debut <= test_date,
|
||||||
FormSemestre.date_fin >= 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/<int:dept_id>/formsemestres_courants")
|
@bp.route("/departement/id/<int:dept_id>/formsemestres_courants")
|
||||||
@ -294,4 +294,4 @@ def dept_formsemestres_courants_by_id(dept_id: int):
|
|||||||
FormSemestre.date_fin >= 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])
|
||||||
|
@ -206,6 +206,7 @@ class FormSemestre(db.Model):
|
|||||||
d["parcours"] = [p.to_dict() for p in self.get_parcours_apc()]
|
d["parcours"] = [p.to_dict() for p in self.get_parcours_apc()]
|
||||||
d["responsables"] = [u.id for u in self.responsables]
|
d["responsables"] = [u.id for u in self.responsables]
|
||||||
d["titre_court"] = self.formation.acronyme
|
d["titre_court"] = self.formation.acronyme
|
||||||
|
d["titre_formation"] = self.titre_formation()
|
||||||
d["titre_num"] = self.titre_num()
|
d["titre_num"] = self.titre_num()
|
||||||
d["session_id"] = self.session_id()
|
d["session_id"] = self.session_id()
|
||||||
return d
|
return d
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.4.16"
|
SCOVERSION = "9.4.17"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user