Commit 4583881c authored by Boris Kocherov's avatar Boris Kocherov

erp5_core: catch ValidationFailed exception in Base_edit needed for interaction_workflow

parent fc47ce29
......@@ -9,6 +9,7 @@
"""
from Products.Formulator.Errors import FormValidationError
from Products.CMFActivity.Errors import ActivityPendingError
from Products.DCWorkflow.DCWorkflow import ValidationFailed
request=container.REQUEST
portal = context.getPortalObject()
......@@ -235,9 +236,15 @@ try:
# Return parsed values
if silent_mode: return (kw, encapsulated_editor_list), 'edit'
# Maybe we should build a list of objects we need
# Update basic attributes
context.edit(REQUEST=request, edit_order=edit_order, **kw)
try:
# Maybe we should build a list of objects we need
# Update basic attributes
context.edit(REQUEST=request, edit_order=edit_order, **kw)
except ValidationFailed, message:
# interaction workflow issue data validation error
if getattr(message, 'msg', None) and same_type(message.msg, []):
message = '. '.join('%s' % x for x in message.msg)
for encapsulated_editor in encapsulated_editor_list:
encapsulated_editor.edit(context)
except ActivityPendingError,e:
......
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