From 5a2f50e81fd3ec039bc9a1ffec3278fb59da65dd Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 15 Dec 2019 09:44:09 -0500 Subject: nfsw/auth.py: Update load_logged_in_user. * nfsw/auth.py (load_logged_in_user): Fix if condition. --- nfsw/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfsw/auth.py b/nfsw/auth.py index f659f23..1a453c4 100644 --- a/nfsw/auth.py +++ b/nfsw/auth.py @@ -204,5 +204,5 @@ def load_logged_in_user(): ).fetchone() if (request.endpoint not in ['auth.terms', 'auth.sorry', 'static'] - and g.user['terms_agreed'] != 1): + and g.user and g.user['terms_agreed'] != 1): return redirect(url_for('auth.terms')) -- cgit v1.2.3