Fix: desinscription des modules d'une UE

This commit is contained in:
Emmanuel Viennet 2021-10-04 15:16:50 +02:00
parent 0ab9a281a9
commit 3e1136a077

View File

@ -527,15 +527,15 @@ def do_etud_desinscrit_ue(etudid, formsemestre_id, ue_id):
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor) cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
cursor.execute( cursor.execute(
"""DELETE FROM notes_moduleimpl_inscription """DELETE FROM notes_moduleimpl_inscription
WHERE moduleimpl_inscription_id IN ( WHERE id IN (
SELECT i.moduleimpl_inscription_id FROM SELECT i.id FROM
notes_moduleimpl mi, notes_modules mod, notes_moduleimpl mi, notes_modules mod,
notes_formsemestre sem, notes_moduleimpl_inscription i notes_formsemestre sem, notes_moduleimpl_inscription i
WHERE sem.formsemestre_id = %(formsemestre_id)s WHERE sem.id = %(formsemestre_id)s
AND mi.formsemestre_id = sem.formsemestre_id AND mi.formsemestre_id = sem.id
AND mod.module_id = mi.module_id AND mod.id = mi.module_id
AND mod.ue_id = %(ue_id)s 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 AND i.etudid = %(etudid)s
) )
""", """,