diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py index 22f27f9fa79fba4c8940fa0d744e1983799c962a..a0ad0a8ad0fb3dca5628a51730a44301ab3a8166 100755 --- a/product/ERP5Type/Utils.py +++ b/product/ERP5Type/Utils.py @@ -338,8 +338,11 @@ def importLocalPropertySheet(class_id, path = None): base_category_dict = {} def registerBaseCategories(property_sheet): global base_category_dict - for bc in getattr(property_sheet, '_categories', ()): - LOG('registerBaseCategories', 0, 'bc = %r' % (bc,)) + category_list = getattr(property_sheet, '_categories', ()) + if type(category_list) is type('') : + category_list = (category_list,) + for bc in category_list : + LOG('registerBaseCategories', 0, 'bc = %r in %s' % (bc, property_sheet)) base_category_dict[bc] = 1 def importLocalInterface(class_id, path = None):