API : resultat formsemestre_order_partitions

This commit is contained in:
Emmanuel Viennet 2022-08-02 16:10:09 +02:00
parent 03e30b4e65
commit 4a3ceb291a

View File

@ -415,7 +415,13 @@ def formsemestre_order_partitions(formsemestre_id: int):
db.session.commit() db.session.commit()
app.set_sco_dept(formsemestre.departement.acronym) app.set_sco_dept(formsemestre.departement.acronym)
sco_cache.invalidate_formsemestre(formsemestre_id) sco_cache.invalidate_formsemestre(formsemestre_id)
return jsonify(formsemestre.to_dict_api()) return jsonify(
[
partition.to_dict()
for partition in formsemestre.partitions.order_by(Partition.numero)
if partition["partition_name"] is not None
]
)
@bp.route("/partition/<int:partition_id>/groups/order", methods=["POST"]) @bp.route("/partition/<int:partition_id>/groups/order", methods=["POST"])