Commit 3c93e915 authored by Nicolas Delaby's avatar Nicolas Delaby

extend support of other content_types

Do not try to parse contents which are not XML with xml parser.
parent 6a8a4776
...@@ -2201,10 +2201,12 @@ class SynchronizationTool(BaseTool): ...@@ -2201,10 +2201,12 @@ class SynchronizationTool(BaseTool):
xml_object = conduit.replaceIdFromXML(xml_object, 'id', xml_object = conduit.replaceIdFromXML(xml_object, 'id',
object.getId(), object.getId(),
as_string=True) as_string=True)
else: elif conduit.getContentType() == 'text/xml':
# no previous, this is the first synchronization # no previous, this is the first synchronization
# store xml view from object as it has been provided. # store xml view from object as it has been provided.
xml_object = etree.tostring(data_subnode) xml_object = etree.tostring(data_subnode)
else:
xml_object = data_subnode
signature.setTemporaryData(xml_object) signature.setTemporaryData(xml_object)
if conflict_list: if conflict_list:
status_code = 'conflict' status_code = 'conflict'
......
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