Commit 212335aa authored by Aurel's avatar Aurel

do not acquire 'categories' property


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11570 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0e4f39f
...@@ -743,7 +743,7 @@ class CategoryTool( UniqueObject, Folder, Base ): ...@@ -743,7 +743,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
if type(spec) is type('a'): if type(spec) is type('a'):
spec = [spec] spec = [spec]
# Filter categories # Filter categories
if hasattr(context, 'categories'): if hasattr(aq_base(context), 'categories'):
for category_url in self._getCategoryList(context): for category_url in self._getCategoryList(context):
try: try:
index = category_url.index('/') index = category_url.index('/')
...@@ -1139,7 +1139,7 @@ class CategoryTool( UniqueObject, Folder, Base ): ...@@ -1139,7 +1139,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
security.declareProtected( Permissions.AccessContentsInformation, '_getCategoryList' ) security.declareProtected( Permissions.AccessContentsInformation, '_getCategoryList' )
def _getCategoryList(self, context): def _getCategoryList(self, context):
if hasattr(context, 'categories'): if hasattr(aq_base(context), 'categories'):
if type(context.categories) == type((1,)): if type(context.categories) == type((1,)):
result = list(context.categories) result = list(context.categories)
elif type(context.categories) == type([]): elif type(context.categories) == type([]):
......
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