Commit d54713db authored by Fabian-Andree Heidemann's avatar Fabian-Andree Heidemann
Browse files

[jsondata] correctly parse argument on server side

parent 2268c2e0
......@@ -84,6 +84,7 @@ class AjaxController(AbstractController):
def setjson(self, key, value, wid=None):
db = cherrypy.request.db
user_id = self.get("user_id")
wid = int(wid) if wid else None
JSONData.set_value(db,
user_id =user_id,
key =key,
......@@ -96,7 +97,7 @@ class AjaxController(AbstractController):
def getjson(self, key, wid=None):
db = cherrypy.request.db
user_id = self.get("user_id")
wid = int(wid)
wid = int(wid) if wid else None
return JSON.dumps(JSONData.get_value(db,
user_id =user_id,
key =key,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment