aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 1dd654df..2138146c 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -109,7 +109,7 @@ logger = utility.logger.getLogger(__name__)
@app.before_request
def connect_db():
db = getattr(g, '_database', None)
- if db is None:
+ if request.endpoint not in ("static", "js") and db is None:
g.db = g._database = sqlalchemy.create_engine(
SQL_URI, encoding="latin1")