[Erp5-report] r19787 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 11 14:02:14 CET 2008


Author: alex
Date: Tue Mar 11 14:02:12 2008
New Revision: 19787

URL: http://svn.erp5.org?rev=19787&view=rev
Log:
* add ability to handle error_message as a list of Messages

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml?rev=19787&r1=19786&r2=19787&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml Tue Mar 11 14:02:12 2008
@@ -123,9 +123,13 @@
     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 @@
                             <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>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=19787&r1=19786&r2=19787&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Tue Mar 11 14:02:12 2008
@@ -1,1 +1,1 @@
-500
+501




More information about the Erp5-report mailing list