fix sco_inscr_passage

This commit is contained in:
Emmanuel Viennet 2021-09-15 00:54:18 +02:00
parent 83174f2f5e
commit 0f9b52bc9b

View File

@ -146,16 +146,15 @@ def list_inscrits_date(sem):
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor) cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
sem["date_debut_iso"] = ndb.DateDMYtoISO(sem["date_debut"]) sem["date_debut_iso"] = ndb.DateDMYtoISO(sem["date_debut"])
cursor.execute( cursor.execute(
"""SELECT I.etudid """SELECT ins.etudid
FROM FROM
notes_formsemestre_inscription ins, notes_formsemestre_inscription ins,
notes_formsemestre S, notes_formsemestre S,
identite i
WHERE ins.formsemestre_id = S.id WHERE ins.formsemestre_id = S.id
AND S.id != %(formsemestre_id)s AND S.id != %(formsemestre_id)s
AND S.date_debut <= %(date_debut_iso)s AND S.date_debut <= %(date_debut_iso)s
AND S.date_fin >= %(date_debut_iso)s AND S.date_fin >= %(date_debut_iso)s
AND ins.dept_id = %(dept_id)s AND S.dept_id = %(dept_id)s
""", """,
sem, sem,
) )