[CMF-checkins] CVS: CMF/CMFCore - CMFCatalogAware.py:1.14
Florent Guillaume
fg@nuxeo.com
Wed, 31 Jul 2002 15:58:47 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv21736
Modified Files:
CMFCatalogAware.py
Log Message:
When recursing using the catalog, ignore old references to deleted
objects.
=== CMF/CMFCore/CMFCatalogAware.py 1.13 => 1.14 ===
path = '/'.join(self.getPhysicalPath())
for brain in catalog.searchResults(path=path):
ob = brain.getObject()
+ if ob is None:
+ # Ignore old references to deleted objects.
+ continue
s = getattr(ob, '_p_changed', 0)
catalog.reindexObject(ob, idxs=['allowedRolesAndUsers'])
if s is None: ob._p_deactivate()