Commit 356e68f2 authored by Nicolas Delaby's avatar Nicolas Delaby

do not calculate actual_xml if not needed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16614 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6366f381
...@@ -1122,12 +1122,12 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -1122,12 +1122,12 @@ class XMLSyncUtilsMixin(SyncCode):
reset = 1 reset = 1
#Object was retrieve but need to be updated without recreated #Object was retrieve but need to be updated without recreated
#usefull when an object is only deleted by workflow. #usefull when an object is only deleted by workflow.
actual_xml = subscriber.getXMLFromObject(object = object, force=1)
if data_subnode is not None: if data_subnode is not None:
if type(data_subnode) != type(''): if type(data_subnode) != type(''):
string_io = StringIO() string_io = StringIO()
PrettyPrint(data_subnode, stream=string_io) PrettyPrint(data_subnode, stream=string_io)
xml_string = string_io.getvalue() xml_string = string_io.getvalue()
actual_xml = subscriber.getXMLFromObject(object = object, force=1)
data_subnode = self.getXupdateObject(xml_string, actual_xml) data_subnode = self.getXupdateObject(xml_string, actual_xml)
conflict_list += conduit.updateNode( conflict_list += conduit.updateNode(
xml=data_subnode, xml=data_subnode,
......
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