Commit 548e2169 authored by Sebastien Robin's avatar Sebastien Robin

Installation of business template was failing when the number of

installed business template was big enough.
Parsing a dict in a loop and calling update every time (even if
keys are not changed) seems to be not reliable and this ends up
calling 2 times the same code for the same key.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35117 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45bf2300
......@@ -1907,9 +1907,8 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
# each portal type
(default_chain, chain_dict) = getChainByType(context)
# First convert all workflow_ids into list.
for key in chain_dict:
chain_dict.update({key: chain_dict[key].\
split(self._chain_string_separator)})
for key, value in chain_dict.iteritems():
chain_dict[key] = value.split(self._chain_string_separator)
# Set the default chain to the empty string is probably the
# best solution, by default it is 'default_workflow', which is
# not very usefull
......@@ -1966,9 +1965,8 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
, portal_type))
chain_dict[chain_key] = self._objects[path]
# convert workflow list into string only at the end.
for key in chain_dict:
chain_dict.update({key: self._chain_string_separator.\
join(chain_dict[key])})
for key, value in chain_dict.iteritems():
chain_dict[key] = self._chain_string_separator.join(value)
context.portal_workflow.manage_changeWorkflows(default_chain,
props=chain_dict)
......
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