From b1c9e0dc09952a2dcd273922a6cb6265866480d6 Mon Sep 17 00:00:00 2001 From: ziirish Date: Fri, 7 Jul 2023 15:07:35 +0200 Subject: [PATCH] fix: make sure we don't initialize the DB connector twice --- burpui/extensions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/burpui/extensions.py b/burpui/extensions.py index b0642e30..5823483d 100644 --- a/burpui/extensions.py +++ b/burpui/extensions.py @@ -110,7 +110,8 @@ def create_db(myapp, cli=False, unittest=False, create=True, celery_worker=False myapp.config["SQLALCHEMY_POOL_SIZE"] = 20 myapp.config["SQLALCHEMY_POOL_RECYCLE"] = 600 - db.init_app(myapp) + if "sqlalchemy" not in myapp.extensions: + db.init_app(myapp) if not cli and not unittest and not celery_worker: # pragma: no cover with myapp.app_context(): try: