From 1e2c740a0863173670207407887ab27c7f5a057b Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 2 Apr 2023 18:59:21 +0200 Subject: [PATCH] fix errors --- files/routes/allroutes.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/routes/allroutes.py b/files/routes/allroutes.py index a2e421a58..413b5669f 100644 --- a/files/routes/allroutes.py +++ b/files/routes/allroutes.py @@ -56,12 +56,10 @@ r = redis.Redis.from_url(app.config["CACHE_REDIS_URL"]) @app.after_request def after_request(response:Response): - if g.v: - user_id = g.v.id - else: - user_id = None + user_id = None if response.status_code < 400: + if g.v: user_id = g.v.id _commit_and_close_db() if request.method == "POST" and not request.path.startswith('/casino/twentyone/'):