Commit 75ba0c70 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Fix 'tuple' object has no attribute 'append'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3227 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2690bcae
......@@ -1054,13 +1054,13 @@ class CategoryTool( UniqueObject, Folder, Base ):
def _getCategoryList(self, context):
if hasattr(context, 'categories'):
if type(context.categories) == type((1,)):
result = context.categories
result = list(context.categories)
elif type(context.categories) == type([]):
result = context.categories
else:
result = []
elif type(context) is type({}):
result = context.get('categories', [])
result = list(context.get('categories', []))
else:
result = []
if getattr(context, 'isCategory', 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