Commit 155afc95 authored by Christophe Dumez's avatar Christophe Dumez

- Fixed checkAll() & unCheckAll() for listbox with objects whose uid is not an integer


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8357 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1675e02b
...@@ -276,7 +276,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -276,7 +276,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
try: try:
selection_uid_dict[int(uid)] = 1 selection_uid_dict[int(uid)] = 1
except ValueError: except ValueError:
pass # this can happen in report selection_uid_dict[uid] = 1
self.setSelectionCheckedUidsFor(selection_name, selection_uid_dict.keys(), REQUEST=REQUEST) self.setSelectionCheckedUidsFor(selection_name, selection_uid_dict.keys(), REQUEST=REQUEST)
if REQUEST is not None: if REQUEST is not None:
return self._redirectToOriginalForm(REQUEST=REQUEST, form_id=form_id, return self._redirectToOriginalForm(REQUEST=REQUEST, form_id=form_id,
...@@ -297,7 +297,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -297,7 +297,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
try: try:
if selection_uid_dict.has_key(int(uid)): del selection_uid_dict[int(uid)] if selection_uid_dict.has_key(int(uid)): del selection_uid_dict[int(uid)]
except ValueError: except ValueError:
pass # This happens in report mode if selection_uid_dict.has_key(uid): del selection_uid_dict[uid]
self.setSelectionCheckedUidsFor(selection_name, selection_uid_dict.keys(), REQUEST=REQUEST) self.setSelectionCheckedUidsFor(selection_name, selection_uid_dict.keys(), REQUEST=REQUEST)
if REQUEST is not None: if REQUEST is not None:
return self._redirectToOriginalForm(REQUEST=REQUEST, form_id=form_id, return self._redirectToOriginalForm(REQUEST=REQUEST, form_id=form_id,
......
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