Commit fb459588 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Check if parent has a portal type rather than parent is a portal object. This is more robust.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6439 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b599c108
......@@ -906,7 +906,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
# We implement here special keywords
if my_base_category == 'parent':
parent = context.aq_parent
if parent is self.getPortalObject():
if not hasattr(aq_base(parent), 'portal_type'):
my_acquisition_object_list = []
else:
#LOG("Parent Object List ",0,str(parent.getRelativeUrl()))
......
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