Commit 6b0e805d authored by Julien Muchembled's avatar Julien Muchembled

ERP5Type: getAccessorHolderPropertyList should always exist

parent 96eca6f1
...@@ -779,13 +779,10 @@ class Base( CopyContainer, ...@@ -779,13 +779,10 @@ class Base( CopyContainer,
def _propertyMap(self, local_properties=False): def _propertyMap(self, local_properties=False):
""" Method overload - properties are now defined on the ptype """ """ Method overload - properties are now defined on the ptype """
klass = self.__class__
property_list = [] property_list = []
# Get all the accessor holders for this portal type # Get all the accessor holders for this portal type
if not local_properties: if not local_properties:
if hasattr(klass, 'getAccessorHolderPropertyList'): property_list += self.__class__.getAccessorHolderPropertyList()
property_list += \
self.__class__.getAccessorHolderPropertyList()
property_list += getattr(self, '_local_properties', []) property_list += getattr(self, '_local_properties', [])
return tuple(property_list) return tuple(property_list)
......
...@@ -178,7 +178,7 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder): ...@@ -178,7 +178,7 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
if content or property['type'] != 'content': if content or property['type'] != 'content':
property_dict.setdefault(property['id'], property) property_dict.setdefault(property['id'], property)
return property_dict.values() return property_dict.itervalues()
def resetAcquisition(cls): def resetAcquisition(cls):
# First, fill the __get__ slot of the class # First, fill the __get__ slot of the class
......
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