Skip to content

Commit

Permalink
Prevent AttributeError when using subscribers.zcml.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jun 30, 2021
1 parent aabdc9a commit d876f11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Products/CMFCore/indexing.py
Expand Up @@ -40,7 +40,8 @@ class PortalCatalogProcessor(object):

def index(self, obj, attributes=None):
catalog = getToolByName(obj, 'portal_catalog', None)
catalog._indexObject(obj)
if catalog is not None:
catalog._indexObject(obj)

def reindex(self, obj, attributes=None, update_metadata=1):
catalog = getToolByName(obj, 'portal_catalog', None)
Expand Down

0 comments on commit d876f11

Please sign in to comment.