Commit 9138a704 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Updated implementation of keep default in setDefaultCategoryMembership

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10023 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da15b817
...@@ -693,9 +693,10 @@ class CategoryTool( UniqueObject, Folder, Base ): ...@@ -693,9 +693,10 @@ class CategoryTool( UniqueObject, Folder, Base ):
# everything except the first occurence of category # everything except the first occurence of category
# this allows to have multiple occurences of the same category # this allows to have multiple occurences of the same category
for category in category_list: for category in category_list:
if category != default_category or found_one: if category == default_category:
new_category_list += [category]
found_one = 1 found_one = 1
elif category != default_category or found_one:
new_category_list += [category]
self.setCategoryMembership(context, base_category, new_category_list, self.setCategoryMembership(context, base_category, new_category_list,
spec=spec, filter=filter, portal_type=portal_type, base=base, keep_default = 0) spec=spec, filter=filter, portal_type=portal_type, base=base, keep_default = 0)
......
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