[Erp5-report] r16092 - /erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 5 18:23:17 CEST 2007
Author: fabien
Date: Wed Sep 5 18:23:17 2007
New Revision: 16092
URL: http://svn.erp5.org?rev=16092&view=rev
Log:
fixed a problem on the contact deletion on the mobile phone
Modified:
erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
Modified: erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py?rev=16092&r1=16091&r2=16092&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py (original)
+++ erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py Wed Sep 5 18:23:17 2007
@@ -1072,8 +1072,16 @@
signature.setRid(rid)
#LOG('gid == rid ?', DEBUG, 'gid=%s, rid=%s' % (gid, rid))
object = subscriber.getObjectFromGid(gid)
- if object is None and not(domain.getSynchronizeWithERP5Sites()):
+ if object == None and not(domain.getSynchronizeWithERP5Sites()):
+ #if the object is None, that could mean two things :
+ # - the object to synchronize don't exists
+ # - the id is not a gid but a rid
+ #here we try to find an object with the rid
+ #LOG('applyActionList, try to find an object with rid', DEBUG, '')
object = subscriber.getObjectFromRid(rid)
+ signature = subscriber.getSignatureFromRid(rid)
+ if signature not in ('', None):
+ gid = signature.getId()
#LOG('applyActionList subscriber.getObjectFromGid %s' % gid, DEBUG, object)
if signature is None:
#LOG('applyActionList, signature is None', DEBUG, signature)
@@ -1198,6 +1206,7 @@
data_subnode = self.getDataText(action)
else:
data_subnode = self.getDataSubNode(action)
+ #LOG('applyActionList, object gid to delete :', 0, subscriber.getObjectFromGid(object_id))
if subscriber.getObjectFromGid(object_id) not in (None, ''):
#if the object exist:
conduit.deleteNode(
@@ -1691,4 +1700,4 @@
def getActivityType(self, domain):
if domain.getActivityEnabled():
return 'SQLDict'
- return 'RAMQueue'
+ return 'RAMQueue'
More information about the Erp5-report
mailing list