Commit 113b3757 authored by Łukasz Nowak's avatar Łukasz Nowak

- allow to pass empty parameters and do not die in such momemnt,

   fallback to reasonable defaults


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43779 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0d4cbe8
...@@ -556,10 +556,20 @@ class SlapTool(BaseTool): ...@@ -556,10 +556,20 @@ class SlapTool(BaseTool):
In any other case returns not important data and HTTP code is 403 Forbidden In any other case returns not important data and HTTP code is 403 Forbidden
""" """
shared = xml_marshaller.xml_marshaller.loads(shared_xml) if shared_xml:
partition_parameter_kw = xml_marshaller.xml_marshaller.loads( shared = xml_marshaller.xml_marshaller.loads(shared_xml)
else:
shared = False
if partition_parameter_xml:
partition_parameter_kw = xml_marshaller.xml_marshaller.loads(
partition_parameter_xml) partition_parameter_xml)
filter_kw = xml_marshaller.xml_marshaller.loads(filter_xml) else:
partition_parameter_kw = dict()
if filter_xml:
filter_kw = xml_marshaller.xml_marshaller.loads(filter_xml)
else:
filter_kw = dict()
instance = etree.Element('instance') instance = etree.Element('instance')
for parameter_id, parameter_value in partition_parameter_kw.iteritems(): for parameter_id, parameter_value in partition_parameter_kw.iteritems():
# cast everything to string # cast everything to string
......
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