diff --git a/app/api/partitions.py b/app/api/partitions.py index 1f7280ca..1dac1b8b 100644 --- a/app/api/partitions.py +++ b/app/api/partitions.py @@ -415,7 +415,13 @@ def formsemestre_order_partitions(formsemestre_id: int): db.session.commit() app.set_sco_dept(formsemestre.departement.acronym) 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//groups/order", methods=["POST"])