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