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

default defined in property sheets was not handled correctly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10272 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab786a9a
No related merge requests found
......@@ -35,6 +35,8 @@ from zLOG import LOG
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.PsycoWrapper import psyco
_MARKER=[]
# Creation of default constructor
class func_code: pass
......@@ -119,7 +121,6 @@ class Getter(Method):
func_code.co_varnames = ('self',)
func_code.co_argcount = 1
func_defaults = ()
_default=None
def __init__(self, id, key, property_type, default=None, storage_id=None):
self._id = id
......@@ -133,7 +134,9 @@ class Getter(Method):
self._storage_id = storage_id
self._is_tales_type = (property_type == 'tales')
def __call__(self, instance, default=_default, object=None, *args, **kw):
def __call__(self, instance, default=_MARKER, object=None, *args, **kw):
if default is _MARKER:
default = self._default
# No acquisition on properties
value = getattr(aq_base(instance), self._storage_id, None)
if value is not None:
......
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