Commit b698db2d authored by Sebastien Robin's avatar Sebastien Robin

add a little change because the previsous fix failes when we create a new site...

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
parent 13b4deaa
...@@ -1212,11 +1212,14 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -1212,11 +1212,14 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
zope_root = self.getPhysicalRoot() zope_root = self.getPhysicalRoot()
site_root = self.aq_parent site_root = self.aq_parent
uid = self.getUidForPath(path)
methods = self.sql_uncatalog_object
root_indexable = int(getattr(zope_root, 'isIndexable', 1)) root_indexable = int(getattr(zope_root, 'isIndexable', 1))
site_indexable = int(getattr(site_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 return None
for method_name in methods: for method_name in methods:
# Do not put try/except here, it is required to raise error # Do not put try/except here, it is required to raise error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment