diff options
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/api_app.py | 2 | ||||
-rw-r--r-- | module/web/utils.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/module/web/api_app.py b/module/web/api_app.py index c3237c743..4a84c85ca 100644 --- a/module/web/api_app.py +++ b/module/web/api_app.py @@ -98,3 +98,5 @@ def logout(): s = request.environ.get('beaker.session') s.delete() + + return dumps(True) 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(): |