Commit 54387d85 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Don't rely on view when redirect

Consider that view is the default is wrong, we should invoke call on the object, this change fix listboxes used on frontpage of a website.
parent 40c5fe66
......@@ -209,7 +209,9 @@ class SelectionTool( BaseTool, SimpleItem ):
warnings.warn('DEPRECATED: _redirectToOriginalForm got called with a query_string. The variables must be passed in REQUEST.form.',
DeprecationWarning)
context = REQUEST['PARENTS'][0]
form_id = dialog_id or REQUEST.get('dialog_id', None) or form_id or REQUEST.get('form_id', 'view')
form_id = dialog_id or REQUEST.get('dialog_id', None) or form_id or REQUEST.get('form_id', None)
if form_id is None:
return context()
return getattr(context, form_id)()
security.declareProtected(ERP5Permissions.View, 'getSelectionNameList')
......
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