Commit 7c862842 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Aurel

CategoryTool: reduce needless call of _removeDuplicateBaseCategoryIdInCategoryPath.

parent fd2fb25c
......@@ -231,11 +231,8 @@ class CategoryTool(BaseTool):
try:
relative_url = str(relative_url)
if base_category is not None:
if base_category is not None and not relative_url.startswith(base_category + '/'):
relative_url = '%s/%s' % (base_category, relative_url)
relative_url = \
self._removeDuplicateBaseCategoryIdInCategoryPath(base_category,
relative_url)
value = self.unrestrictedTraverse(relative_url)
except (TypeError, KeyError, NotFound):
value = None
......
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