From b698db2d0a1a49b03e480fcc067741cdf93ee955 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Fri, 27 Oct 2006 14:28:25 +0000 Subject: [PATCH] add a little change because the previsous fix failes when we create a new site when there is no table into mysql git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10989 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/SQLCatalog.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index 37228c5931..d756189969 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -1212,11 +1212,14 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): zope_root = self.getPhysicalRoot() site_root = self.aq_parent - 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 not (root_indexable and site_indexable): + return None + + uid = self.getUidForPath(path) + methods = self.sql_uncatalog_object + if uid is None: return None for method_name in methods: # Do not put try/except here, it is required to raise error -- 2.30.9