Commit ec7d3866 authored by Jérome Perrin's avatar Jérome Perrin

core: do not ignore ActivityPendingError in Base_edit

They should be caught earlier by field validator.
If an ActivityPendingError occurs, we don't want to "half-edit" the document.
parent 1e22f611
......@@ -8,7 +8,6 @@
from the context update logic
"""
from Products.Formulator.Errors import FormValidationError
from Products.CMFActivity.Errors import ActivityPendingError
request=container.REQUEST
portal = context.getPortalObject()
......@@ -215,11 +214,11 @@ encapsulated_editor_list = []
MARKER = []
message = Base_translateString("Data updated.")
try:
# We process all the field in form and
# we check if they are in the request,
# then we edit them
for field in form.get_fields():
# We process all the field in form and
# we check if they are in the request,
# then we edit them
for field in form.get_fields():
parseField(field)
## XXX We need to find a way not to use meta_type.
......@@ -232,16 +231,14 @@ try:
elif(field_meta_type == 'MatrixBox'):
editMatrixBox(field, request.get(field.id))
# Return parsed values
if silent_mode: return (kw, encapsulated_editor_list), 'edit'
# 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)
for encapsulated_editor in encapsulated_editor_list:
# Maybe we should build a list of objects we need
# Update basic attributes
context.edit(REQUEST=request, edit_order=edit_order, **kw)
for encapsulated_editor in encapsulated_editor_list:
encapsulated_editor.edit(context)
except ActivityPendingError,e:
message = Base_translateString("%s" % e)
if message_only:
return message
......
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