Commit 0e0c067d authored by wenjie.zheng's avatar wenjie.zheng

Revert action provider list modifications.

parent 58d82eb3
...@@ -1668,9 +1668,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -1668,9 +1668,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
self.portal_workflow = new_tool self.portal_workflow = new_tool
self.portal_workflow.id = 'portal_workflow' self.portal_workflow.id = 'portal_workflow'
self._delObject('portal_workflow_new') self._delObject('portal_workflow_new')
# check action provider list
if 'portal_workflow' not in self.portal_actions.listActionProviders():
self.portal_actions.addActionProvider('portal_workflow')
Globals.InitializeClass(ERP5Site) Globals.InitializeClass(ERP5Site)
def getBootstrapDirectory(): def getBootstrapDirectory():
......
...@@ -52,8 +52,11 @@ def listFilteredActionsFor(self, object=None): ...@@ -52,8 +52,11 @@ def listFilteredActionsFor(self, object=None):
Finally, this patch detects tools that are no longer action providers and Finally, this patch detects tools that are no longer action providers and
invokes the migration of their actions to portal_actions invokes the migration of their actions to portal_actions
""" """
actions = []
for provider_name in listActionProviders(): listActionProviderlist = list(self.listActionProviders())
if 'portal_workflow' not in listActionProviderlist:
listActionProviderlist.append('portal_workflow')
for provider_name in listActionProviderlist:
# Include actions from specific tools. # Include actions from specific tools.
provider = getattr(self, provider_name) provider = getattr(self, provider_name)
if hasattr(provider, 'getActionListFor'): if hasattr(provider, 'getActionListFor'):
......
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