Commit 7f253e94 authored by Alexandre Boeglin's avatar Alexandre Boeglin

fixed uninstall method of WorkflowChainItem: it was removing all workflow

chains declared in the business template


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10595 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca71366b
...@@ -1394,7 +1394,12 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem): ...@@ -1394,7 +1394,12 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
props=chain_dict) props=chain_dict)
def uninstall(self, context, **kw): def uninstall(self, context, **kw):
(default_chain, chain_dict) = getChainByType(context) (default_chain, chain_dict) = getChainByType(context)
for path in self._objects.keys(): object_path = kw.get('object_path', None)
if object_path is not None:
object_keys = [object_path]
else:
object_keys = self._objects.keys()
for path in object_keys:
path_splitted = path.split('/', 1) path_splitted = path.split('/', 1)
if len(path_splitted) < 2: if len(path_splitted) < 2:
continue continue
......
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