diff --git a/product/CMFCategory/CategoryTool.py b/product/CMFCategory/CategoryTool.py index 926f2f967d719819d4c261bf44ee54c5eab65409..675969df9fde8580bd1b4e9ee14ac05647009c0b 100755 --- a/product/CMFCategory/CategoryTool.py +++ b/product/CMFCategory/CategoryTool.py @@ -1348,8 +1348,11 @@ class CategoryTool( UniqueObject, Folder, Base ): This returns a catalog_search resource with can then be used by getCategoryMemberItemList """ from Products.ERP5Form.Selection import DomainSelection - if base_category is None: - raise CategoryError('getCategoryMemberValueList must know the base category') + if base_category is None: + if context.getPortalType() == "Base Category": + base_category = context.getBaseCategoryId() + else: + raise CategoryError('getCategoryMemberValueList must know the base category') strict_membership = kw.get('strict_membership', kw.get('strict', 0)) catalog_search = self.portal_catalog(portal_type = portal_type, # TODO: make it work in catalog tool