From 081ad0d5e90b7725a2afcaefd1e4bee9497d562e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 29 Jun 2022 13:27:29 +0200 Subject: [PATCH] Fix: suppression anciennes UE avec formules --- app/scodoc/sco_edit_ue.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index 016d88807..677c1ae49 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -52,7 +52,6 @@ from app.scodoc.sco_exceptions import ( ) from app.scodoc import html_sco_header -from app.scodoc import sco_cache from app.scodoc import sco_codes_parcours from app.scodoc import sco_edit_apc from app.scodoc import sco_edit_matiere @@ -188,7 +187,11 @@ def do_ue_delete(ue_id, delete_validations=False, force=False): "DELETE FROM scolar_formsemestre_validation WHERE ue_id=%(ue_id)s", {"ue_id": ue.id}, ) - + # delete old formulas + ndb.SimpleQuery( + "DELETE FROM notes_formsemestre_ue_computation_expr WHERE ue_id=%(ue_id)s", + {"ue_id": ue.id}, + ) # delete all matiere in this UE mats = sco_edit_matiere.matiere_list({"ue_id": ue.id}) for mat in mats: