Switch to UV
This commit is contained in:
5
db.py
5
db.py
@@ -47,6 +47,7 @@ class DataBase():
|
||||
def close_connection(self, exception=None):
|
||||
db = g.pop('database', None)
|
||||
if db is not None:
|
||||
db.rollback()
|
||||
self._pool.putconn(db)
|
||||
|
||||
def execute(self, query, args=(), one=False, commit=False):
|
||||
@@ -429,8 +430,8 @@ class DataBase():
|
||||
WHERE
|
||||
W.person_id = %s
|
||||
AND E.exercise_id = %s AND
|
||||
(%s IS NULL OR W.start_date >= %s) AND
|
||||
(%s IS NULL OR W.start_date <= %s)
|
||||
(%s::date IS NULL OR W.start_date >= %s::date) AND
|
||||
(%s::date IS NULL OR W.start_date <= %s::date)
|
||||
ORDER BY
|
||||
W.start_date;
|
||||
""", [person_id, exercise_id, min_date, min_date, max_date, max_date])
|
||||
|
||||
Reference in New Issue
Block a user