params in serve_json can be dict of list
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.4.1-alpha.1+timestamp.2012.12.21.00.22.11
|
||||
Version 2.4.1-alpha.1+timestamp.2012.12.22.08.57.50
|
||||
|
||||
@@ -4265,7 +4265,10 @@ class Service(object):
|
||||
if not method in methods:
|
||||
return return_error(id, 100, 'method "%s" does not exist' % method)
|
||||
try:
|
||||
s = methods[method](**params)
|
||||
if isinstance(params,dict):
|
||||
s = methods[method](**params)
|
||||
else:
|
||||
s = methods[method](*params)
|
||||
if hasattr(s, 'as_list'):
|
||||
s = s.as_list()
|
||||
return return_response(id, s)
|
||||
|
||||
Reference in New Issue
Block a user