Commit 2547ca5e authored by Romain Courteaud's avatar Romain Courteaud

Modified setListboxDisplayMode: create selection if it does not exist.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2658 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b61a6e26
...@@ -641,6 +641,9 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -641,6 +641,9 @@ class SelectionTool( UniqueObject, SimpleItem ):
request = REQUEST request = REQUEST
if selection_name is None: selection_name = request.list_selection_name if selection_name is None: selection_name = request.list_selection_name
selection = self.getSelectionFor(selection_name, REQUEST) selection = self.getSelectionFor(selection_name, REQUEST)
if selection is None:
selection = Selection()
self.setSelectionFor(selection_name,selection,REQUEST=REQUEST)
if listbox_display_mode == 'FlatListMode': if listbox_display_mode == 'FlatListMode':
flat_list_mode = 1 flat_list_mode = 1
......
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