From 3648c2034381b9fd283fb83ae485617e2e68aaee Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Mon, 12 Mar 2007 10:03:13 +0000 Subject: [PATCH] Implementation of Tester now conformant to spec. An object has a property only if the property has been set on it. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13333 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Accessor/Base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/product/ERP5Type/Accessor/Base.py b/product/ERP5Type/Accessor/Base.py index 7b475b51a9..2b556db073 100644 --- a/product/ERP5Type/Accessor/Base.py +++ b/product/ERP5Type/Accessor/Base.py @@ -179,5 +179,4 @@ class Tester(Method): self._storage_id = storage_id def __call__(self, instance, *args, **kw): - #return getattr(instance, self._key, None) not in self._null - return getattr(aq_base(instance), self._storage_id, None) is not None # No acquisition on properties + return aq_base(instance).__dict__.has_key(self._storage_id) # No acquisition on properties -- 2.30.9