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
No related merge requests found
......@@ -556,10 +556,20 @@ class SlapTool(BaseTool):
In any other case returns not important data and HTTP code is 403 Forbidden
"""
shared = xml_marshaller.xml_marshaller.loads(shared_xml)
partition_parameter_kw = xml_marshaller.xml_marshaller.loads(
if shared_xml:
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)
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')
for parameter_id, parameter_value in partition_parameter_kw.iteritems():
# 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