forked from ScoDoc/ScoDoc
Fix: suppression anciennes UE avec formules
This commit is contained in:
parent
72144a4952
commit
081ad0d5e9
@ -52,7 +52,6 @@ from app.scodoc.sco_exceptions import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from app.scodoc import html_sco_header
|
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_codes_parcours
|
||||||
from app.scodoc import sco_edit_apc
|
from app.scodoc import sco_edit_apc
|
||||||
from app.scodoc import sco_edit_matiere
|
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",
|
"DELETE FROM scolar_formsemestre_validation WHERE ue_id=%(ue_id)s",
|
||||||
{"ue_id": ue.id},
|
{"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
|
# delete all matiere in this UE
|
||||||
mats = sco_edit_matiere.matiere_list({"ue_id": ue.id})
|
mats = sco_edit_matiere.matiere_list({"ue_id": ue.id})
|
||||||
for mat in mats:
|
for mat in mats:
|
||||||
|
Loading…
Reference in New Issue
Block a user