From 27510af932ec416af5dbf97a11a76156a6294912 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 2 Apr 2023 19:00:27 +0200 Subject: [PATCH] same as last commit --- files/routes/allroutes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/allroutes.py b/files/routes/allroutes.py index 413b5669f..41607bf4f 100644 --- a/files/routes/allroutes.py +++ b/files/routes/allroutes.py @@ -59,7 +59,8 @@ def after_request(response:Response): user_id = None if response.status_code < 400: - if g.v: user_id = g.v.id + if hasattr(g, 'v') and g.v: + user_id = g.v.id _commit_and_close_db() if request.method == "POST" and not request.path.startswith('/casino/twentyone/'):