From 92124da3f0ea36bc1ddbc4ef2c2ae5f0dc4863b2 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 9 Mar 2020 15:31:55 -0500 Subject: I think I found the issue; I only saw it on production instead of my branch because it was tied to a session expiring --- wqflask/wqflask/user_session.py | 2 +- wqflask/wqflask/views.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/user_session.py b/wqflask/wqflask/user_session.py index 49ad4f0a..20c8d84d 100644 --- a/wqflask/wqflask/user_session.py +++ b/wqflask/wqflask/user_session.py @@ -75,7 +75,7 @@ class UserSession(object): response = make_response(redirect(url_for('login'))) #response.set_cookie(self.cookie_name, '', expires=0) flash("Due to inactivity your session has expired. If you'd like please login again.") - return response + #return response #return else: self.record = dict(login_time = time.time(), diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 42b20880..8a80c26c 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -85,10 +85,6 @@ def connect_db(): g.db = g._database = sqlalchemy.create_engine(SQL_URI, encoding="latin1") logger.debug(g.db) -@app.before_request -def before_request(): - g.user_session = user_session.UserSession() - @app.teardown_appcontext def shutdown_session(exception=None): db = getattr(g, '_database', None) -- cgit v1.2.3