Skip to content

Commit

Permalink
fix: make sure we don't initialize the DB connector twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ziirish committed Jul 7, 2023
1 parent 779f6ef commit b1c9e0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion burpui/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b1c9e0d

Please sign in to comment.