[CMF-checkins] CVS: CMF/CMFCore - CMFCatalogAware.py:1.7.4.6

Florent Guillaume fg@nuxeo.com
Wed, 31 Jul 2002 15:59:31 -0400


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv21854

Modified Files:
      Tag: CMF-1_3-branch
	CMFCatalogAware.py 
Log Message:
Merged change from HEAD:

When recursing using the catalog, ignore old references to deleted
objects.


=== CMF/CMFCore/CMFCatalogAware.py 1.7.4.5 => 1.7.4.6 ===
             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()