[Erp5-report] r15519 - /erp5/trunk/products/ERP5SyncML/Subscription.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Aug 7 13:54:46 CEST 2007


Author: nicolas
Date: Tue Aug  7 13:54:46 2007
New Revision: 15519

URL: http://svn.erp5.org?rev=15519&view=rev
Log:
Rmove useless method, clean code

Modified:
    erp5/trunk/products/ERP5SyncML/Subscription.py

Modified: erp5/trunk/products/ERP5SyncML/Subscription.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Subscription.py?rev=15519&r1=15518&r2=15519&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Subscription.py (original)
+++ erp5/trunk/products/ERP5SyncML/Subscription.py Tue Aug  7 13:54:46 2007
@@ -298,7 +298,7 @@
     if status == self.NOT_SYNCHRONIZED:
       self.setTempXML(None)
       self.setPartialXML(None)
-    elif status in (self.PUB_CONFLICT_MERGE,self.SENT):
+    elif status in (self.PUB_CONFLICT_MERGE, self.SENT):
       # We have a solution for the conflict, don't need to keep the list
       self.resetConflictList()
 
@@ -570,27 +570,6 @@
     Returns the object corresponding to this signature
     """
     return self.getParentValue().getObjectFromGid(self.getObjectId())
-
-  def checkSynchronizationNeeded(self, object):
-    """
-    We will look at date, if there is no changes, no need to syncrhonize
-    """
-    last_modification = DateTime(object.ModificationDate())
-    # LOG('checkSynchronizationNeeded object.ModificationDate()',0,object.ModificationDate())
-    last_synchronization = self.getLastSynchronizationDate()
-    parent = object.aq_parent
-    # XXX CPS Specific
-    if parent.id == 'portal_repository': # Make sure there is no sub objects
-    #if 1:
-      if last_synchronization is not None and last_modification is not None \
-        and self.getSubscriberXupdate() is None and self.getPublisherXupdate() is None and \
-        self.getStatus()==self.NOT_SYNCHRONIZED:
-        if last_synchronization > last_modification:
-        #if 1:
-          # LOG('checkSynchronizationNeeded, no modification on: ',0,object.id)
-          self.setStatus(self.SYNCHRONIZED)
-    
-
 
 def addSubscription( self, id, title='', REQUEST=None ):
     """
@@ -864,9 +843,8 @@
   def getConduit(self):
     """
       get the Conduit
-
-    """
-    return getattr(self,'conduit',None)
+    """
+    return getattr(self, 'conduit', None)
 
   def getQuery(self):
     """
@@ -1080,15 +1058,6 @@
         break
     return o
 
-#  def setOneWaySyncFromServer(self,value):
-#    """
-#    If this option is enabled, then we will not 
-#    send our own modifications
-#    """
-#    self.one_way_sync_from_server = value
-#
-
-
   def getObjectList(self, **kw):
     """
     This returns the list of sub-object corresponding
@@ -1354,7 +1323,7 @@
       Check if there's a signature with this uid
     """
     #return self.signatures.has_key(gid)
-    return gid in self.objectIds()
+    return self.getSignatureFromGid(gid) is not None
 
   def resetAllSignatures(self):
     """




More information about the Erp5-report mailing list