Commit 4fd68919 authored by Yoshinori Okuji's avatar Yoshinori Okuji

In getSingleCategoryMembershipList, if category_url does not have any slash,...

In getSingleCategoryMembershipList, if category_url does not have any slash, set my_base_category to category_url.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3544 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 62bbcba9
...@@ -720,8 +720,11 @@ class CategoryTool( UniqueObject, Folder, Base ): ...@@ -720,8 +720,11 @@ class CategoryTool( UniqueObject, Folder, Base ):
# Filter categories # Filter categories
if hasattr(context, 'categories'): if hasattr(context, 'categories'):
for category_url in self._getCategoryList(context): for category_url in self._getCategoryList(context):
index = category_url.index('/') try:
my_base_category = category_url[:index] index = category_url.index('/')
my_base_category = category_url[:index]
except ValueError:
my_base_category = category_url
if my_base_category == base_category: if my_base_category == base_category:
#LOG("getSingleCategoryMembershipList",0,"%s %s %s %s" % (context.getRelativeUrl(), #LOG("getSingleCategoryMembershipList",0,"%s %s %s %s" % (context.getRelativeUrl(),
# my_base_category, base_category, category_url)) # my_base_category, base_category, category_url))
......
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