Fix: list_abs_date

This commit is contained in:
Emmanuel Viennet 2022-04-28 01:13:48 +02:00
parent e90f3077f8
commit 7866743eb8

View File

@ -423,17 +423,19 @@ def list_abs_date(etudid, beg_date=None, end_date=None):
print("On rentre")
cnx = ndb.GetDBConnexion()
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
print("Juste avant le SQL")
cursor.execute(
"""SELECT jour, matin, estabs, estjust, description FROM ABSENCES A
WHERE A.ETUDID = %(etudid)s"""
+ ""
req = """SELECT jour, matin, estabs, estjust, description
FROM ABSENCES A
WHERE A.ETUDID = %(etudid)s""" + (
""
if beg_date is None
else """
AND A.jour >= %(beg_date)s
AND A.jour <= %(end_date)s
""",
"""
)
cursor.execute(
req,
vars(),
)