From a2c5be22cb154889f7660deed06cc41ef83a7bda Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 4 Jul 2023 23:26:14 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20enregistre=20moyenne=20des=20UEs=20ant?= =?UTF-8?q?=C3=A9rieures=20non=20ADM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_cursus_dut.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/scodoc/sco_cursus_dut.py b/app/scodoc/sco_cursus_dut.py index 9eab3da6..007c602c 100644 --- a/app/scodoc/sco_cursus_dut.py +++ b/app/scodoc/sco_cursus_dut.py @@ -949,6 +949,7 @@ def do_formsemestre_validate_ue( "ue_id": ue_id, "semestre_id": semestre_id, "is_external": is_external, + "moy_ue": moy_ue, } if date: args["event_date"] = date @@ -965,12 +966,11 @@ def do_formsemestre_validate_ue( cursor.execute("delete from scolar_formsemestre_validation where " + cond, args) # insert args["code"] = code - if code == ADM: - if moy_ue is None: - # stocke la moyenne d'UE capitalisée: - ue_status = nt.get_etud_ue_status(etudid, ue_id) - moy_ue = ue_status["moy"] if ue_status else "" - args["moy_ue"] = moy_ue + if (code == ADM) and (moy_ue is None): + # stocke la moyenne d'UE capitalisée: + ue_status = nt.get_etud_ue_status(etudid, ue_id) + moy_ue = ue_status["moy"] if ue_status else "" + log("formsemestre_validate_ue: create %s" % args) if code is not None: scolar_formsemestre_validation_create(cnx, args)