Commit 614a8349 authored by Julien Muchembled's avatar Julien Muchembled Committed by Julien Muchembled

fixup! Folder: Make recursiveReindexObject scalable by calling _recurseCallMethod

With commit babbf56f, some objects that were
not indexed are now indexed, and this fails when these objects can't be indexed.

An exemple is when a PythonScript is stored inside a Web Site:

  Traceback (innermost last):
  Module Products.CMFActivity.ActivityTool, line 1360, in invokeGroup
    traverse(method_id)(expanded_object_list)
  Module Products.ERP5Catalog.CatalogTool, line 939, in catalogObjectList
    super(CatalogTool, self).catalogObjectList(tmp_object_list, **m.kw)
  Module Products.ZSQLCatalog.ZSQLCatalog, line 828, in catalogObjectList
    catalog_value=catalog,
  Module Products.ERP5Catalog.CatalogTool, line 875, in wrapObjectList
    - __traceback_info__: (<PythonScript at /erp5/web_site_module/...>,)
    and document_object._getAcquireLocalRoles():
  AttributeError: _getAcquireLocalRoles

Before, such object was skipped because it does not have recursiveReindexObject.
parent 05f96cb8
......@@ -1245,7 +1245,8 @@ class Folder(CopyContainer, OFSFolder2, CMFBTreeFolder, CMFHBTreeFolder, Base, F
)
def _isDocumentNonIndexable(self, document):
return not document.isSubtreeIndexable()
return (getattr(aq_base(document), 'isSubtreeIndexable', None) is None
or not document.isSubtreeIndexable())
def _updateActivateKwWithSerialisationTag(self, document, activate_kw):
activate_kw['serialization_tag'] = document.getRootDocumentPath()
......
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