Commit 0c97582c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Kazuhiko Shiozaki

CategoryTool: reduce needless call of _removeDuplicateBaseCategoryIdInCategoryPath.

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