From 8cb83f484304a30ec2eabc8893a8fda7a7bb957d Mon Sep 17 00:00:00 2001 From: Christophe Dumez <christophe@nexedi.com> Date: Mon, 7 Aug 2006 10:07:11 +0000 Subject: [PATCH] - Fixed 2 bugs in Listbox, one concerning unicode support and another concerning a file instance in the REQUEST that couldn't be pickled git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9063 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/ListBox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index 39ea3fccb6..b7e9db6254 100644 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -926,7 +926,7 @@ class ListBoxRenderer: # Remove useless parameters. for k, v in params.items(): - if v in (None, ''): + if v in (None, '') or hasattr(v, 'read'): del params[k] # Set the columns. The idea behind this is that, instead of selecting all columns, @@ -1841,7 +1841,7 @@ class ListBoxRendererLine: # Process the value. if processed_value is None: processed_value = u'' - else: + elif not isinstance(processed_value, unicode): processed_value = unicode(str(processed_value), self.renderer.getEncoding()) value_list.append((original_value, processed_value)) -- 2.30.9