[Erp5-report] r13183 - in /erp5/trunk/products/ZSQLCatalog: SQLCatalog.py ZSQLCatalog.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Mar 2 14:51:01 CET 2007


Author: seb
Date: Fri Mar  2 14:50:59 2007
New Revision: 13183

URL: http://svn.erp5.org?rev=13183&view=rev
Log:
- Fixed some unindex problems while doing hot reindexing
- the path in uncatalog object is inconsistent.

Modified:
    erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
    erp5/trunk/products/ZSQLCatalog/ZSQLCatalog.py

Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=13183&r1=13182&r2=13183&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Fri Mar  2 14:50:59 2007
@@ -1522,7 +1522,7 @@
     method = getattr(self, method_name)
     method(uid = uid)
 
-  def uncatalogObject(self, path=None,uid=None):
+  def uncatalogObject(self, path=None, uid=None):
     """
     Uncatalog and object from the Catalog.
 

Modified: erp5/trunk/products/ZSQLCatalog/ZSQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/ZSQLCatalog.py?rev=13183&r1=13182&r2=13183&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/ZSQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/ZSQLCatalog.py Fri Mar  2 14:50:59 2007
@@ -714,7 +714,7 @@
       if hot_reindexing:
         destination_catalog = self.getSQLCatalog(self.destination_sql_catalog_id)
         if destination_catalog.id != catalog.id:
-          if self.hot_reindexing_state == 'recording':
+          if self.hot_reindexing_state == HOT_REINDEXING_RECORDING_STATE:
             destination_catalog.recordObjectList(url_list, 1)
           else:
             destination_catalog.catalogObjectList(wrapped_object_list,**kw)
@@ -725,16 +725,18 @@
   def uncatalog_object(self, uid=None,path=None, sql_catalog_id=None):
     """ wrapper around catalog """
     catalog = self.getSQLCatalog(sql_catalog_id)
+    if uid is None:
+      raise TypeError, "sorry uncatalog_object supports only uid"
     if catalog is not None:
       catalog.uncatalogObject(uid=uid,path=path)
 
       if self.hot_reindexing_state is not None and self.source_sql_catalog_id == catalog.id:
         destination_catalog = self.getSQLCatalog(self.destination_sql_catalog_id)
         if destination_catalog.id != catalog.id:
-          if self.hot_reindexing_state == 'recording':
+          if self.hot_reindexing_state == HOT_REINDEXING_RECORDING_STATE:
             destination_catalog.recordObjectList([uid], 0)
           else:
-            destination_catalog.uncatalogObject(uid)
+            destination_catalog.uncatalogObject(uid=uid)
 
   def beforeUncatalogObject(self, uid=None,path=None, sql_catalog_id=None):
     """ wrapper around catalog """




More information about the Erp5-report mailing list