From e77c25b3985802e1ba5927119166f84992175af8 Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Sat, 2 Nov 2024 19:19:29 -0300 Subject: [PATCH] refactor(utils): adds app to drop_db --- app/utils/db_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/utils/db_utils.py b/app/utils/db_utils.py index 2b4bdeb..e39e9b1 100644 --- a/app/utils/db_utils.py +++ b/app/utils/db_utils.py @@ -12,5 +12,7 @@ class DBUtils(): with app.app_context(): db.create_all() - def drop_db(): - db.drop_all() + def drop_db(app): + with app.app_context(): + db.drop_all() +