Commit 96c2aefe authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: check before script type before execution.

parent 36226d6b
......@@ -616,8 +616,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
if script_id:
script = self._getOb(script_id, None)
# Pass lots of info to the script in a single parameter.
kwargs = form_kw
sci = StateChangeInfo(
if script.getTypeInfo().getId() == 'Workflow Script':
kwargs = form_kw
sci = StateChangeInfo(
document, self, former_status, tdef, old_sdef, new_sdef, kwargs)
try:
script(sci) # May throw an exception.
......
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