Commit ce90aa0d authored by Jérome Perrin's avatar Jérome Perrin

remove _checkPropertiesAttributes, it was never called

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6858 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74e80a18
...@@ -54,35 +54,12 @@ class PropertyTypeValidity(Constraint): ...@@ -54,35 +54,12 @@ class PropertyTypeValidity(Constraint):
'date': (type(DateTime()), ), 'date': (type(DateTime()), ),
} }
def _checkPropertiesAttributes(self):
"""
Make sure instance has no _properties
"""
# XXX FIXME what is _properties ?
errors = []
if '_properties' in object.__dict__:
# Remove _properties
error_message = "Instance has local _properties property"
if fixit:
local_properties = object._properties
del object._properties
object._local_properties = []
class_property_ids = object.propertyIds()
for p in local_properties:
if p['id'] not in class_property_ids:
object._local_properties.append(p)
error_message += " (Fixed)"
errors.append(self._generateError(object, error_message))
return errors
def checkConsistency(self, object, fixit=0): def checkConsistency(self, object, fixit=0):
""" """
This is the check method, we return a list of string, This is the check method, we return a list of string,
each string corresponds to an error. each string corresponds to an error.
""" """
errors = [] errors = []
# XXX FIXME Is this still useful ?
errors.extend(self._checkPropertiesAttributes())
# For each attribute name, we check type # For each attribute name, we check type
for property in object.propertyMap(): for property in object.propertyMap():
property_id = property['id'] property_id = property['id']
......
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