From 450ea6fcb2816beb291f8fee3dafc9daa04399f1 Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Thu, 30 Sep 2010 14:21:30 +0000 Subject: [PATCH] change behavior to fit the doc string : base -- a boolean or a string. If it is a string, then use that string as a base before, if it was a string it was never used because the expression "if str("something"):" is always True git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38811 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/CMFCategory/Category.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product/CMFCategory/Category.py b/product/CMFCategory/Category.py index 6585276960..84eab42b2b 100644 --- a/product/CMFCategory/Category.py +++ b/product/CMFCategory/Category.py @@ -365,7 +365,9 @@ class Category(Folder): """ if not base: base = '' # Make sure we get a meaningful base - if base: + elif isinstance(base, str): + base = base + '/' + elif base: base = self.getBaseCategoryId() + '/' # Make sure we get a meaningful base url_list = [] for value in self.getCategoryChildValueList(recursive=recursive, -- 2.30.9