Commit f46d01da authored by Sebastien Robin's avatar Sebastien Robin

check more carefully the category resource

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3425 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8c66267a
No related merge requests found
......@@ -518,8 +518,9 @@ class Resource(XMLMatrix, CoreResource, Variated):
if kw.has_key('categories'):
new_category_list.extend(kw['categories'])
del kw['categories']
if not 'resource' in [x.split('/')[0] for x in new_category_list]:
new_category_list += ('resource/' + self.getRelativeUrl(),)
resource_category = 'resource/' + self.getRelativeUrl()
if not resource_category in new_category_list:
new_category_list += (resource_category,)
tmp_context = self.asContext(context=context,
categories=new_category_list,
......
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