Commit cab45059 authored by Romain Courteaud's avatar Romain Courteaud

Improve error message.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18719 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bd23068b
......@@ -1586,6 +1586,12 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
chain_dict['chain_%s' % portal_type] = ', '.join(
old_chain_workflow_id_set.keys())
else:
# Check if it has normally to remove a workflow chain, in order to
# improve the error message
for wf_id in self._objects[path].split(', '):
if wf_id.startswith('-'):
raise ValueError, '"%s" is not a workflow ID for %s' % \
(wf_id, portal_type)
chain_dict['chain_%s' % portal_type] = self._objects[path]
else:
chain_dict['chain_%s' % portal_type] = self._objects[path]
......
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