From 8aba6d6632895c2fbe5b3960e4c3b54a6c327d88 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 27 Jan 2022 11:53:16 +0100 Subject: [PATCH] Fix: do_etud_inscrit_ue --- app/scodoc/sco_moduleimpl_inscriptions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/scodoc/sco_moduleimpl_inscriptions.py b/app/scodoc/sco_moduleimpl_inscriptions.py index baf5de70b..8cd7e5e99 100644 --- a/app/scodoc/sco_moduleimpl_inscriptions.py +++ b/app/scodoc/sco_moduleimpl_inscriptions.py @@ -565,17 +565,17 @@ def do_etud_inscrit_ue(etudid, formsemestre_id, ue_id): cnx = ndb.GetDBConnexion() cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor) cursor.execute( - """SELECT mi.moduleimpl_id + """SELECT mi.id FROM notes_moduleimpl mi, notes_modules mod, notes_formsemestre sem - 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 """, {"formsemestre_id": formsemestre_id, "ue_id": ue_id}, ) res = cursor.dictfetchall() - for moduleimpl_id in [x["moduleimpl_id"] for x in res]: + for moduleimpl_id in [x["id"] for x in res]: sco_moduleimpl.do_moduleimpl_inscription_create( {"moduleimpl_id": moduleimpl_id, "etudid": etudid}, formsemestre_id=formsemestre_id,