Bugfix/db_helper: Fix bug with the query_break()

This commit is contained in:
2025-10-17 11:40:49 -06:00
parent 930919bbae
commit 74bfe6c116

View File

@@ -104,7 +104,7 @@ class DBHelper():
self.__CONN = connect_config(self._config) self.__CONN = connect_config(self._config)
self.__CONN.autocommit = True self.__CONN.autocommit = True
cursor = self.__CONN.cursor() cursor = self.__CONN.cursor()
cursor.execute(f"SELECT * FROM breaks WHERE date >= NOW() - INTERVAL '1 day' and DATE <= NOW() + interval '{days} days' ORDER BY date ASC;") cursor.execute(f"SELECT * FROM breaks WHERE open_range >= NOW() - INTERVAL '1 day' and open_range <= NOW() + interval '{days} days' ORDER BY open_range ASC;")
self.__CONN.commit() self.__CONN.commit()
return cursor.fetchall() return cursor.fetchall()