Commit 7834de25 authored by Sebastien Robin's avatar Sebastien Robin

make sure we don't use restricted Traverse with an unicode string.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@583 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e1919591
......@@ -111,6 +111,10 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
def __call__(self, selection_method = None, context=None, REQUEST=None):
if self.selection_invert_mode is 0:
if selection_method is None:
# XXX Bad hack, we should not have unicode here XXX
# we should find why we do have unicode
if type(self.selection_method_path) is type(u'a'):
self.selection_method_path = self.selection_method_path.encode('ascii')
selection_method = context.unrestrictedTraverse(self.selection_method_path)
if hasattr(self, 'selection_sort_on'):
if len(self.selection_sort_on) > 0:
......
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