Continue Flask migration.
This commit is contained in:
parent
bab3ad83aa
commit
f630707fd0
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user