Commit 42bafea3 authored by Romain Courteaud's avatar Romain Courteaud 🐸

Prevent inheritance of the description property from the class variable...

Prevent inheritance of the description property from the class variable defined on PortalFolderBase.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13591 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2862d08d
...@@ -143,9 +143,12 @@ class Getter(Method): ...@@ -143,9 +143,12 @@ class Getter(Method):
default = args[0] default = args[0]
else: else:
default = self._default default = self._default
# No acquisition on properties # No acquisition on properties but inheritance.
value = getattr(aq_base(instance), self._storage_id, self._null[0]) # Instead of using getattr, which use inheritance from SuperClass
if value not in self._null: # why not use __dict__.get directly ?
# It seems slower when property is defined, but much more faster if not
value = getattr(aq_base(instance), self._storage_id, None)
if value is not None:
if self._is_tales_type and kw.get('evaluate', 1): if self._is_tales_type and kw.get('evaluate', 1):
return evaluateTales(instance, value) return evaluateTales(instance, value)
else: else:
......
...@@ -349,6 +349,9 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn): ...@@ -349,6 +349,9 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
_edit = Base._edit _edit = Base._edit
_setPropValue = Base._setPropValue _setPropValue = Base._setPropValue
_propertyMap = Base._propertyMap # are there any others XXX ? _propertyMap = Base._propertyMap # are there any others XXX ?
# XXX Prevent inheritance from PortalFolderBase
description = None
# Overload __init__ so that we do not take into account title # Overload __init__ so that we do not take into account title
# This is required for test_23_titleIsNotDefinedByDefault # This is required for test_23_titleIsNotDefinedByDefault
......
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