From 47520e0cb4824615a0642429d1590b5a8912f8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 5 Apr 2006 09:42:46 +0000 Subject: [PATCH] don't fail if the stat method doesn't return any results git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6463 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/ListBox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index c1deca0339..9054a131f2 100644 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -1937,7 +1937,8 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> if column is not None: if column[0] == column[1]: alias = extended_columns[n][2] - value = getattr(count_results[0],alias,'') + if len(count_results): + value = getattr(count_results[0],alias,'') else: value = getattr(here, column[1]) #LOG('ListBox', 0, 'column = %s, value = %s' % (repr(column), repr(value))) -- 2.30.9