From f85a1564b045220929c0a73fc194178c71537794 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 2 Jun 2024 00:21:10 +0200 Subject: [PATCH] Update code. --- thermostat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thermostat.py b/thermostat.py index 4a28e37..479a7a3 100644 --- a/thermostat.py +++ b/thermostat.py @@ -129,7 +129,8 @@ class Status_thermostat(Resource): return result api.add_namespace(ns_thermostat) -db.create_all() +with app.app_context(): + db.create_all() migrate = Migrate(app, db, compare_type=True)