Commit 972f4900 authored by Aurel's avatar Aurel

fix some method call : retrieve object from portal and use getter

method
pass domain parameter to addNode method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34383 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5ba2d9a
......@@ -748,7 +748,7 @@ class XMLSyncUtilsMixin(SyncCode):
result['finished'] = 0
break
#LOG('getSyncMLData object_path', INFO, object_path)
object = self.unrestrictedTraverse(object_path)
object = self.getPortalObject().unrestrictedTraverse(object_path)
status = self.SENT
object_gid = domain.getGidFromObject(object)
if not object_gid:
......@@ -756,7 +756,7 @@ class XMLSyncUtilsMixin(SyncCode):
local_gid_list += [object_gid]
force = 0
if ''.join(syncml_data_list).count('\n') < self.MAX_LINES and not \
object.id.startswith('.'):
object.getId().startswith('.'):
# If not we have to cut
#LOG('getSyncMLData', 0, 'object_path: %s' % '/'.join(object_path))
#LOG('getSyncMLData', 0, 'xml_mapping: %s' % str(domain.getXMLMapping()))
......@@ -1005,7 +1005,8 @@ class XMLSyncUtilsMixin(SyncCode):
if object is None:
add_data = conduit.addNode(xml=data_subnode,
object=destination,
object_id=object_id)
object_id=object_id,
domain=domain)
conflict_list.extend(add_data['conflict_list'])
# Retrieve directly the object from addNode
object = add_data['object']
......
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