From 7e7adc64713f74976d5994af36b5f758620fb37b Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 13 Oct 2012 21:39:58 +0200 Subject: added JSON and WS client, re organized tests, new classes for easier api tests --- module/web/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/web/utils.py') 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(): -- cgit v1.2.3