Commit 952297e1 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hal_json_style] Handle :list url argument

parent d36bc4f7
...@@ -363,9 +363,13 @@ def parseActionUrl(url): ...@@ -363,9 +363,13 @@ def parseActionUrl(url):
param_value = int(param_value) param_value = int(param_value)
elif param_type == "bool": elif param_type == "bool":
param_value = True if param_value.lower() in ("true", "1") else False param_value = True if param_value.lower() in ("true", "1") else False
elif param_type == "list":
if param_name not in param_dict:
param_dict[param_name] = []
param_dict[param_name].append(param_value)
param_value = param_dict[param_name]
else: else:
raise ValueError("Cannot convert param {}={} to type {}. Feel free to add implemetation at the position of this exception.".format( raise ValueError("Cannot parse argument: {}".format(param))
param_name, param_value, param_type))
param_dict[param_name] = param_value param_dict[param_name] = param_value
return { return {
'view_id': script, 'view_id': script,
......
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