Fix: list_abs_date
This commit is contained in:
parent
e90f3077f8
commit
7866743eb8
@ -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(),
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user