From a25407565cac5693bfd7ea872068fad8c7399df6 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 15 Jul 2024 21:22:21 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20clonage=20semestre=20sans=20dates=20?= =?UTF-8?q?=C3=A9valuations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_formsemestre_edit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_formsemestre_edit.py b/app/scodoc/sco_formsemestre_edit.py index d7e6349a..1fdafb03 100644 --- a/app/scodoc/sco_formsemestre_edit.py +++ b/app/scodoc/sco_formsemestre_edit.py @@ -1332,6 +1332,8 @@ def do_formsemestre_clone( args = dict(e.__dict__) args.pop("_sa_instance_state") args.pop("id") + args.pop("date_debut", None) + args.pop("date_fin", None) args["moduleimpl_id"] = modimpl_new.id new_eval = Evaluation(**args) db.session.add(new_eval) @@ -1339,7 +1341,10 @@ def do_formsemestre_clone( # Copie les poids APC de l'évaluation new_eval.set_ue_poids_dict(e.get_ue_poids_dict()) db.session.commit() - + if clone_evaluations: + flash( + "Attention: les évaluations n'ont plus de dates: n'oubliez pas de les indiquer" + ) # 3- copy uecoefs for ue_coef in FormSemestreUECoef.query.filter_by( formsemestre_id=formsemestre_orig.id