From 7834de25d66419670bfe9d59ae7a5bc1848bce6d Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Thu, 11 Mar 2004 08:40:26 +0000 Subject: [PATCH] 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 --- product/ERP5Form/Selection.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/product/ERP5Form/Selection.py b/product/ERP5Form/Selection.py index ff0368817d..71d32d9288 100755 --- a/product/ERP5Form/Selection.py +++ b/product/ERP5Form/Selection.py @@ -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: -- 2.30.9