Commit e5eb587c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

if we get multiple ignore_layout parameter, we only care the first one,...

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.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26598 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 970b98c1
......@@ -110,7 +110,10 @@ class WebSection(Domain, PermanentURLMixIn):
# 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)
......
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