Continue Flask migration.

This commit is contained in:
yohan 2024-06-03 01:51:30 +02:00
parent 453ef0f53c
commit d238c86099

View File

@ -276,7 +276,6 @@ def thermostat_loop():
try:
db.session.add(data)
db.session.commit()
return "OK", 201
except sqlalchemy.exc.IntegrityError as e:
try:
db.session.rollback()
@ -286,11 +285,9 @@ def thermostat_loop():
except Exception as e:
db.session.rollback()
logging.error(e)
return "K0", 400
except Exception as e:
db.session.rollback()
logging.error(e)
return "K0", 400
#cursor.execute("INSERT OR REPLACE INTO set_mode (value) VALUES ('"+new_forced_mode+"')")
#dbconn.commit()