From 22e20028fc17a4de9a07364bc6cd6d14ccb8bf9d Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Fri, 21 Jun 2024 18:03:56 +0200 Subject: [PATCH] Fix code. --- api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index 2386a48..ca70a57 100644 --- a/api.py +++ b/api.py @@ -260,5 +260,6 @@ class Search_integer_metric(Resource): api.add_namespace(ns_stock) api.add_namespace(ns_float_metric) api.add_namespace(ns_integer_metric) -db.create_all() +with app.app_context(): + db.create_all()