Commit 3048f368 authored by Jean-Paul Smets's avatar Jean-Paul Smets

added hasProperty


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc7b6e2e
...@@ -47,6 +47,13 @@ class ERP5PropertyManager(PropertyManager): ...@@ -47,6 +47,13 @@ class ERP5PropertyManager(PropertyManager):
value=type_converters[proptype](value) value=type_converters[proptype](value)
self._setPropValue(id, 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): def getPropertyType(self, id):
"""Get the type of property 'id', returning None if no """Get the type of property 'id', returning None if no
such property exists""" such property exists"""
......
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