From a635dbadbf5868cda7a9bc80d8ecf98c20c3f92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Sat, 28 Jan 2006 17:03:58 +0000 Subject: [PATCH] take acre of the list len for workflow chain git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5408 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index cb85d24237..5685640483 100755 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -1088,7 +1088,13 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem): p = context.getPortalObject() (default_chain, chain_dict) = getChainByType(context) for key in self._archive.keys(): - portal_type, workflow = key.split(' | ') + wflist = key.split(' | ') + if len(wflist) == 2: + portal_type = wflist[0] + worflow = wf_list[1] + else: + portal_type = wflist[0] + worflow = '' if workflow not in chain_dict['chain_%s' % portal_type]: raise if self._objects.has_key(portal_type): -- 2.30.9