From 3048f3680acca1031f5b25866457fa311338f08c Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Thu, 11 Dec 2003 08:11:27 +0000 Subject: [PATCH] added hasProperty git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/ZopePatch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/product/ERP5Type/ZopePatch.py b/product/ERP5Type/ZopePatch.py index ea4810bb06..b23daac3bf 100755 --- a/product/ERP5Type/ZopePatch.py +++ b/product/ERP5Type/ZopePatch.py @@ -47,6 +47,13 @@ class ERP5PropertyManager(PropertyManager): value=type_converters[proptype](value) self._setPropValue(id, value) + def hasProperty(self, id): + """Return true if object has a property 'id'""" + for p in self.propertyIds(): + if id==p: + return 1 + return 0 + def getPropertyType(self, id): """Get the type of property 'id', returning None if no such property exists""" -- 2.30.9