Commit 984032fb authored by Sebastien Robin's avatar Sebastien Robin

check if the object id is not none


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2167 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 361c3569
...@@ -770,11 +770,12 @@ class XMLSyncUtilsMixin(SyncCode): ...@@ -770,11 +770,12 @@ class XMLSyncUtilsMixin(SyncCode):
# Then store the xml of this new subobject # Then store the xml of this new subobject
if object is None: if object is None:
object_id = domain.generateNewIdWithGenerator(object=destination_path,gid=object_gid) object_id = domain.generateNewIdWithGenerator(object=destination_path,gid=object_gid)
conflict_list += conduit.addNode(xml=data_subnode, object=destination_path, if object_id is not None:
object_id=object_id) conflict_list += conduit.addNode(xml=data_subnode, object=destination_path,
object = domain.getObjectFromGid(object_gid) object_id=object_id)
signature.setPath(object.getPhysicalPath()) object = domain.getObjectFromGid(object_gid)
LOG('applyActionList',0,'object after add: %s' % repr(object)) signature.setPath(object.getPhysicalPath())
LOG('applyActionList',0,'object after add: %s' % repr(object))
if object is not None: if object is not None:
LOG('SyncModif',0,'addNode, found the object') LOG('SyncModif',0,'addNode, found the object')
#mapping = getattr(object,domain.getXMLMapping(),None) #mapping = getattr(object,domain.getXMLMapping(),None)
......
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