diff options
Diffstat (limited to 'module/web/utils.py')
-rw-r--r-- | module/web/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/web/utils.py b/module/web/utils.py index 1c0b81338..ac85d9f91 100644 --- a/module/web/utils.py +++ b/module/web/utils.py @@ -39,10 +39,10 @@ def set_session(request, user): return s def get_user_api(s): - uid = s.get("uid", None) - if uid is not None: - api = PYLOAD.withUserContext(uid) - return api + if s: + uid = s.get("uid", None) + if uid is not None: + return PYLOAD.withUserContext(uid) return None def is_mobile(): |