[Erp5-report] r26598 - /erp5/trunk/products/ERP5/Document/WebSection.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 22 18:00:11 CEST 2009


Author: kazuhiko
Date: Wed Apr 22 18:00:11 2009
New Revision: 26598

URL: http://svn.erp5.org?rev=26598&view=rev
Log:
if we get multiple ignore_layout parameter, we only care the first one, because ignore_layout parameter can exist in both cancel_url and hidden fields.

Modified:
    erp5/trunk/products/ERP5/Document/WebSection.py

Modified: erp5/trunk/products/ERP5/Document/WebSection.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/WebSection.py?rev=26598&r1=26597&r2=26598&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/WebSection.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/WebSection.py [utf8] Wed Apr 22 18:00:11 2009
@@ -110,7 +110,10 @@
         # Fix common user mistake and transform '1' string to boolean
         for web_param in ['ignore_layout', 'editable_mode']:
           if hasattr(request, web_param):
-            if getattr(request, web_param, None) in ('1', 1, True):
+            param = getattr(request, web_param, None)
+            if isinstance(param, (list, tuple)):
+              param = param[0]
+            if param in ('1', 1, True):
               request.set(web_param, True)
             else:
               request.set(web_param, False)




More information about the Erp5-report mailing list