Commit 594b9332 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix a bug that causes an error if REQUEST is None.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23968 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d169fc38
...@@ -441,6 +441,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -441,6 +441,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
# selection_name, sort_on and form_id params are kept only for bacward compatibilty # selection_name, sort_on and form_id params are kept only for bacward compatibilty
# as some test call setSelectionQuickSortOrder in url with these params # as some test call setSelectionQuickSortOrder in url with these params
listbox_id = None listbox_id = None
if REQUEST is not None:
form = REQUEST.form form = REQUEST.form
if sort_on is None: if sort_on is None:
listbox_id, sort_on = form["setSelectionQuickSortOrder"].split(".", 1) listbox_id, sort_on = form["setSelectionQuickSortOrder"].split(".", 1)
...@@ -452,6 +453,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -452,6 +453,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
else: else:
form_id = form['form_id'] form_id = form['form_id']
if REQUEST is not None:
if listbox_id is not None: if listbox_id is not None:
selection_name_key = "%s_list_selection_name" %listbox_id selection_name_key = "%s_list_selection_name" %listbox_id
selection_name = form[selection_name_key] selection_name = form[selection_name_key]
......
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