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()