Continue Flask migration.

This commit is contained in:
yohan 2024-06-02 11:33:27 +02:00
parent bab3ad83aa
commit f630707fd0

View File

@ -132,6 +132,8 @@ def get_metric(metric, current_time, interval):
def get_forced_mode():
with app.app_context():
row = db.session.execute(db.select(Set_mode.value, Set_mode.timestamp)).first()
if row is None:
return None
#cur.execute("SELECT value, timestamp FROM set_mode WHERE name='mode'")
#row = cur.fetchone()
data = dict(zip(['value', 'timestamp'], row))