Amend c95e33831: even fewer globals than expected.

master
Snakes 2022-10-15 07:27:26 -04:00
parent c95e33831c
commit 35fd90c9ca
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import time
def calc_users(v):
# Some globals we expect aren't available when rendering error pages
if not g.agent or not ('session_id' in session):
if not g or not g.agent or not session or not ('session_id' in session):
return ''
loggedin = cache.get(f'{SITE}_loggedin') or {}