summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-12-15 09:44:09 -0500
committerrsiddharth <s@ricketyspace.net>2019-12-15 09:44:09 -0500
commit5a2f50e81fd3ec039bc9a1ffec3278fb59da65dd (patch)
tree8cb55f3b72c19379c889b2f75eb78afae44758a1
parent79e0ee00974721fc88542375919f380dca6f7ab7 (diff)
nfsw/auth.py: Update load_logged_in_user.
* nfsw/auth.py (load_logged_in_user): Fix if condition.
-rw-r--r--nfsw/auth.py2
1 files changed, 1 insertions, 1 deletions
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'))