Commit 46908781 authored by Aurel's avatar Aurel

check that portal type is in workflow chain at install


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5411 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bde36f8a
...@@ -1095,6 +1095,7 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem): ...@@ -1095,6 +1095,7 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
else: else:
portal_type = wflist[0] portal_type = wflist[0]
workflow = '' workflow = ''
if chain_dict.has_key('chain_%s' % portal_type):
if workflow not in chain_dict['chain_%s' % portal_type]: if workflow not in chain_dict['chain_%s' % portal_type]:
raise raise
if self._objects.has_key(portal_type): if self._objects.has_key(portal_type):
...@@ -1103,6 +1104,8 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem): ...@@ -1103,6 +1104,8 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
self._objects[portal_type] = workflow_list self._objects[portal_type] = workflow_list
else: else:
self._objects[portal_type] = [workflow] self._objects[portal_type] = [workflow]
else:
LOG('BusinessTemplate build', 0, 'portal type %s not found in workflow chain' %(portal_type))
def generateXml(self, path=None): def generateXml(self, path=None):
xml_data = '<workflow_chain>' xml_data = '<workflow_chain>'
......
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