Commit da1f305c authored by Nicolas Delaby's avatar Nicolas Delaby

conduit.convertToXml do more than transform string to etree, use etree.XML instead

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29489 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 419d147a
......@@ -1014,11 +1014,10 @@ class XMLSyncUtilsMixin(SyncCode):
# Object was retrieve but need to be updated without recreated
# usefull when an object is only deleted by workflow.
if data_subnode is not None:
xml_string = conduit.convertToXml(data_subnode)
actual_xml = conduit.getXMLFromObjectWithId(object,
xml_mapping=domain.getXMLMapping(force=1))
actual_xml = conduit.convertToXml(actual_xml)
xml_string_gid = conduit.replaceIdFromXML(xml_string, gid)
actual_xml = etree.XML(actual_xml, parser=parser)
xml_string_gid = conduit.replaceIdFromXML(data_subnode, gid)
actual_xml_gid = conduit.replaceIdFromXML(actual_xml, gid)
# use gid as compare key because their ids can be different
data_subnode = self.getXupdateObject(xml_string_gid, actual_xml_gid)
......
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