Commit d020bf4b authored by Jérome Perrin's avatar Jérome Perrin

minor change, pass default to unrestrictedTraverse rather than catching KeyError


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8791 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c63f2134
......@@ -756,11 +756,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
else:
append(category_url[len(my_base_category)+1:])
else:
try:
my_reference = self.unrestrictedTraverse(category_url)
except KeyError:
# object does not exist
my_reference = None
my_reference = self.unrestrictedTraverse(category_url, None)
if my_reference is not None:
if my_reference.portal_type in spec:
if base:
......
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