diff --git a/app/models/notes.py b/app/models/notes.py index 9edecd0163..6da4ef5d60 100644 --- a/app/models/notes.py +++ b/app/models/notes.py @@ -78,14 +78,14 @@ def etud_has_notes_attente(etudid, formsemestre_id): """SELECT COUNT(*) FROM notes_notes n, notes_evaluation e, notes_moduleimpl m, notes_moduleimpl_inscription i - WHERE n.etudid = %(etudid)s - and n.value = %(code_attente)s + WHERE n.etudid = :etudid + and n.value = :code_attente and n.evaluation_id = e.id and e.moduleimpl_id = m.id - and m.formsemestre_id = %(formsemestre_id)s + and m.formsemestre_id = :formsemestre_id and e.coefficient != 0 and m.id = i.moduleimpl_id - and i.etudid=%(etudid)s + and i.etudid = :etudid """, { "formsemestre_id": formsemestre_id,