From 7f7d820fdb0ba63b753546e8ca2764dfba6ebb78 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Wed, 22 Dec 2004 11:18:11 +0000 Subject: [PATCH] extra tests in _propertyMap git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2087 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 670b3809d3..7a1862d083 100755 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -280,8 +280,10 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): global aq_portal_type ptype = self.portal_type self._aq_dynamic(None) # Make sure aq_dynamic has been called once - return tuple(list(getattr(aq_portal_type[ptype], '_properties', None)) + - list(getattr(self, '_local_properties', ()))) + if aq_portal_type.has_key(ptype): + return tuple(list(getattr(aq_portal_type[ptype], '_properties', None)) + + list(getattr(self, '_local_properties', ()))) + return ERP5PropertyManager._propertyMap(self) def _aq_dynamic(self, id): global aq_portal_type -- 2.30.9