summaryrefslogtreecommitdiffstats
path: root/module/web/utils.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-10-13 21:39:58 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-10-13 21:39:58 +0200
commit7e7adc64713f74976d5994af36b5f758620fb37b (patch)
tree868084317f8818dbb327c76eaff3c7c7edce0231 /module/web/utils.py
parentfixed JsEngine init (diff)
downloadpyload-7e7adc64713f74976d5994af36b5f758620fb37b.tar.xz
added JSON and WS client, re organized tests, new classes for easier api tests
Diffstat (limited to 'module/web/utils.py')
-rw-r--r--module/web/utils.py8
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():