From ca3191a8ce3da0e79582a98edcd7b7eaa4db8c4d Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 2 Jun 2024 21:35:42 +0200 Subject: [PATCH] Continue Flask migration. --- thermostat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thermostat.py b/thermostat.py index 44f883e..9d2018b 100644 --- a/thermostat.py +++ b/thermostat.py @@ -197,7 +197,7 @@ class Set_mode_thermostat(Resource): db.session.add(data) db.session.commit() return "OK", 201 - except sqlite3.IntegrityError: + except sqlalchemy.exc.IntegrityError as e: logging.error("catched") return "K0", 400 except Exception as e: