[Erp5-report] r12686 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 14 10:32:13 CET 2007


Author: vincent
Date: Wed Feb 14 10:32:11 2007
New Revision: 12686

URL: http://svn.erp5.org?rev=12686&view=rev
Log:
Define a method to insert the reserved uid line in the catalog used when clearing catalog.

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

Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=12686&r1=12685&r2=12686&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Wed Feb 14 10:32:11 2007
@@ -867,17 +867,23 @@
     self.clearReserved()
 
     # Add a dummy item so that SQLCatalog will not use existing uids again.
+    self.insertMaxUid()
+
+    # Remove the cache of catalog schema.
+    if hasattr(self, '_v_catalog_schema_dict') :
+      del self._v_catalog_schema_dict
+
+    self._clearSecurityCache()
+
+  def insertMaxUid(self):
+    """
+      Add a dummy item so that SQLCatalog will not use existing uids again.
+    """
     if self._max_uid is not None and self._max_uid() != 0:
       method_id = self.sql_catalog_reserve_uid
       method = getattr(self, method_id)
       self._max_uid.change(1)
       method(uid = [self._max_uid()])
-
-    # Remove the cache of catalog schema.
-    if hasattr(self, '_v_catalog_schema_dict') :
-      del self._v_catalog_schema_dict
-
-    self._clearSecurityCache()
 
   def clearReserved(self):
     """




More information about the Erp5-report mailing list