Commit 3aabf4fb authored by Romain Courteaud's avatar Romain Courteaud

Copy the error message, in order to prevent this persistent object to be stored

in multiple workflow history (in case of workflow script calling a workflow
transition on another object).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30135 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 197f06cc
......@@ -34,6 +34,7 @@ from string import join
import sys
from zLOG import LOG
from Acquisition import aq_base
from copy import deepcopy
# Patch WorkflowUIMixin to add description on workflows
from Products.DCWorkflow.WorkflowUIMixin import WorkflowUIMixin as WorkflowUIMixin_class
......@@ -330,7 +331,7 @@ def DCWorkflowDefinition_executeTransition(self, ob, tdef=None, kwargs=None):
script(sci) # May throw an exception.
except ValidationFailed, validation_exc:
before_script_success = 0
before_script_error_message = validation_exc.msg
before_script_error_message = deepcopy(validation_exc.msg)
validation_exc_traceback = sys.exc_traceback
except ObjectMoved, moved_exc:
ob = moved_exc.getNewObject()
......
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