Commit 7126b3c3 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Fix code to only ignore the category with depth = 0.

i.e
foo_category/a/a1
In this case only paths 'a' and 'a/a1' as useful.
parent e5fce549
...@@ -1323,7 +1323,7 @@ class BasicStructure: ...@@ -1323,7 +1323,7 @@ class BasicStructure:
# split category path because # split category path because
# _getDefaultAcquiredCategoryMembership returns only the # _getDefaultAcquiredCategoryMembership returns only the
# category id instead of the relative url # category id instead of the relative url
category_id = category_obj.split("/")[-1] category_id = "/".join(category_obj.split("/")[1:])
object_list.extend([ s_obj for s_obj in main_object_list \ object_list.extend([ s_obj for s_obj in main_object_list \
if s_obj._getDefaultAcquiredCategoryMembership(bc) == category_id]) if s_obj._getDefaultAcquiredCategoryMembership(bc) == category_id])
sec_layer_object_list.extend([ s_obj for s_obj in secondary_object_list \ sec_layer_object_list.extend([ s_obj for s_obj in secondary_object_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