in CMF2.x some tools stop being action providers. Don't try to remove actions...

in CMF2.x some tools stop being action providers. Don't try to remove actions from them (approved by jm with caveat that we will have to find out where these actions went)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29569 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24a2d223
......@@ -1653,6 +1653,11 @@ class ERP5Generator(PortalGenerator):
# Remove unused default actions
def removeActionsFromTool(tool, remove_list):
from Products.CMFCore.interfaces import IActionProvider
if not IActionProvider.providedBy(tool):
# On CMF 2.x, some tools (portal_membership)
# are no longer action providers
return
action_id_list = [i.id for i in tool.listActions()]
remove_index_list = []
for i in remove_list:
......
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