[CMF-checkins] CVS: CMF/CMFCore - PortalObject.py:1.7 WorkflowTool.py:1.34

Florent Guillaume fg@nuxeo.com
Sun, 4 Aug 2002 19:32:37 -0400


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

Modified Files:
	PortalObject.py WorkflowTool.py 
Log Message:
Back to the original fix (sigh...). The portal root really needs to be a
bona fide portalish context.

When updating role mappings, don't fail if trying to reindex
portal_catalog itself. This can happen if Folders are workflowed.



=== CMF/CMFCore/PortalObject.py 1.6 => 1.7 ===
 class PortalObjectBase(PortalFolder, SkinnableObjectManager):
 
     meta_type = 'Portal Site'
-    portal_type = None
     _isPortalRoot = 1
 
     # Ensure certain attributes come from the correct base class.


=== CMF/CMFCore/WorkflowTool.py 1.33 => 1.34 ===
                 count = count + 1
                 if hasattr(aq_base(ob), 'reindexObject'):
                     # Reindex security-related indexes
-                    ob.reindexObject(idxs=['allowedRolesAndUsers'])
+                    try:
+                        ob.reindexObject(idxs=['allowedRolesAndUsers'])
+                    except TypeError:
+                        # Catch attempts to reindex portal_catalog.
+                        pass
         if hasattr(aq_base(ob), 'objectItems'):
             obs = ob.objectItems()
             if obs: