diff --git a/app/scodoc/sco_cursus_dut.py b/app/scodoc/sco_cursus_dut.py index 9eab3da6b..007c602c5 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)