From 3e1136a077db074b5b02ae41fb677320d728fcb0 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 4 Oct 2021 15:16:50 +0200 Subject: [PATCH] Fix: desinscription des modules d'une UE --- app/scodoc/sco_moduleimpl_inscriptions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/scodoc/sco_moduleimpl_inscriptions.py b/app/scodoc/sco_moduleimpl_inscriptions.py index 9fa261a90..93d420d0e 100644 --- a/app/scodoc/sco_moduleimpl_inscriptions.py +++ b/app/scodoc/sco_moduleimpl_inscriptions.py @@ -527,15 +527,15 @@ def do_etud_desinscrit_ue(etudid, formsemestre_id, ue_id): cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor) cursor.execute( """DELETE FROM notes_moduleimpl_inscription - WHERE moduleimpl_inscription_id IN ( - SELECT i.moduleimpl_inscription_id FROM + WHERE id IN ( + SELECT i.id FROM notes_moduleimpl mi, notes_modules mod, notes_formsemestre sem, notes_moduleimpl_inscription i - WHERE sem.formsemestre_id = %(formsemestre_id)s - AND mi.formsemestre_id = sem.formsemestre_id - AND mod.module_id = mi.module_id + WHERE sem.id = %(formsemestre_id)s + AND mi.formsemestre_id = sem.id + AND mod.id = mi.module_id AND mod.ue_id = %(ue_id)s - AND i.moduleimpl_id = mi.moduleimpl_id + AND i.moduleimpl_id = mi.id AND i.etudid = %(etudid)s ) """,