summaryrefslogtreecommitdiffstats
path: root/module/web/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/utils.py')
-rw-r--r--module/web/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/web/utils.py b/module/web/utils.py
index ac85d9f91..ba6a6a59e 100644
--- a/module/web/utils.py
+++ b/module/web/utils.py
@@ -41,7 +41,7 @@ def set_session(request, user):
def get_user_api(s):
if s:
uid = s.get("uid", None)
- if uid is not None:
+ if (uid is not None) and (PYLOAD is not None):
return PYLOAD.withUserContext(uid)
return None