Commit 7ef80e65 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Do not pass selection_index to list_url, if it is None.

Reported by Vincent Pelletier.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8075 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2cbdc3de
......@@ -1998,8 +1998,10 @@ class ListBoxHTMLRenderer(ListBoxRenderer):
selection = self.getSelection()
if list_method is not None:
method_path = getPath(self.getContext()) + '/' + self.getListMethodName()
list_url = '%s?selection_name=%s&selection_index=%s' % \
(self.getUrl(), self.getRequestedSelectionName(), self.getSelectionIndex())
list_url = '%s?selection_name=%s' % (self.getUrl(), self.getRequestedSelectionName())
selection_index = self.getSelectionIndex()
if selection_index is not None:
list_url += '&selection_index=%s' % selection_index
selection.edit(method_path = method_path, list_url = list_url)
self.getSelectionTool().setSelectionFor(self.getSelectionName(), selection, REQUEST = self.request)
......
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