From fb4595888ddbf6dccd1c3db42b8135a711dc9639 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Mon, 3 Apr 2006 16:36:01 +0000 Subject: [PATCH] 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 --- product/CMFCategory/CategoryTool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/CMFCategory/CategoryTool.py b/product/CMFCategory/CategoryTool.py index 7e63231a05..99b7c6e709 100644 --- a/product/CMFCategory/CategoryTool.py +++ b/product/CMFCategory/CategoryTool.py @@ -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())) -- 2.30.9