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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 27 16:28:27 CEST 2006


Author: seb
Date: Fri Oct 27 16:28:25 2006
New Revision: 10989

URL: http://svn.erp5.org?rev=10989&view=rev
Log:
add a little change because the previsous fix failes when we create a new site when there is no table into mysql

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=10989&r1=10988&r2=10989&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Fri Oct 27 16:28:25 2006
@@ -1212,11 +1212,14 @@
       zope_root = self.getPhysicalRoot()
       site_root = self.aq_parent
 
+    root_indexable = int(getattr(zope_root, 'isIndexable', 1))
+    site_indexable = int(getattr(site_root, 'isIndexable', 1))
+    if not (root_indexable and site_indexable):
+      return None
+
     uid = self.getUidForPath(path)
     methods = self.sql_uncatalog_object
-    root_indexable = int(getattr(zope_root, 'isIndexable', 1))
-    site_indexable = int(getattr(site_root, 'isIndexable', 1))
-    if not (root_indexable and site_indexable) or uid is None:
+    if uid is None:
       return None
     for method_name in methods:
       # Do not put try/except here, it is required to raise error




More information about the Erp5-report mailing list