Commit 58ce7813 authored by Jérome Perrin's avatar Jérome Perrin

When base category is not specified in getCategoryMemberValueList and

the context is a (Base) Category, guess the base category from the
context.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5830 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 32154804
......@@ -1349,7 +1349,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
"""
from Products.ERP5Form.Selection import DomainSelection
if base_category is None:
if context.getPortalType() == "Base Category":
if context.getPortalType() in ( "Base Category", "Category") :
base_category = context.getBaseCategoryId()
else:
raise CategoryError('getCategoryMemberValueList must know the base category')
......
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