Commit fa37831a authored by Alexandre Boeglin's avatar Alexandre Boeglin

* add ability to handle error_message as a list of Messages

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19787 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6d65bf43
......@@ -123,9 +123,13 @@ try:\n
doaction_param_list[\'workflow_action\'],\n
**doaction_param_list)\n
except ValidationFailed, error_message:\n
if hasattr(error_message, \'msg\'):\n
if getattr(error_message, \'msg\', None):\n
# use of Message class to store message+mapping+domain\n
message = error_message.msg\n
if same_type(message, []):\n
message = \'. \'.join(\'%s\' % x for x in message)\n
else:\n
message = str(message)\n
else:\n
message = str(error_message)\n
return context.ERP5Site_redirect(\n
......@@ -221,8 +225,8 @@ return context.ERP5Site_redirect(\n
<string>tuple</string>
<string>_apply_</string>
<string>error_message</string>
<string>hasattr</string>
<string>message</string>
<string>same_type</string>
<string>str</string>
<string>portal_status_message</string>
</tuple>
......
500
\ No newline at end of file
501
\ No newline at end of file
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