From f500ea46d40cf761024ce638c0b65c4804c8ff6b Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 22 Dec 2012 08:58:28 -0600 Subject: [PATCH] params in serve_json can be dict of list --- VERSION | 2 +- gluon/tools.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index e0a488d8..1687bdd2 100644 --- a/VERSION +++ b/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 diff --git a/gluon/tools.py b/gluon/tools.py index 8c8a7fa7..abdc61ba 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -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)