forked from MarseyWorld/MarseyWorld
Amend 35fd90c9c: calc_users gets g but not g.agent.
parent
35fd90c9ca
commit
ed2b6938ba
|
@ -10,7 +10,8 @@ import time
|
||||||
|
|
||||||
def calc_users(v):
|
def calc_users(v):
|
||||||
# Some globals we expect aren't available when rendering error pages
|
# Some globals we expect aren't available when rendering error pages
|
||||||
if not g or not g.agent or not session or not ('session_id' in session):
|
if (not g or not hasattr(g, 'agent')
|
||||||
|
or not session or not ('session_id' in session)):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
loggedin = cache.get(f'{SITE}_loggedin') or {}
|
loggedin = cache.get(f'{SITE}_loggedin') or {}
|
||||||
|
|
Loading…
Reference in New Issue