From d238c860993258504ac460139731eebfe3dd3759 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Mon, 3 Jun 2024 01:51:30 +0200 Subject: [PATCH] Continue Flask migration. --- thermostat.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/thermostat.py b/thermostat.py index 99ef01b..13a3397 100644 --- a/thermostat.py +++ b/thermostat.py @@ -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()