Commit 8ba092ec authored by Alexandre Boeglin's avatar Alexandre Boeglin

should not cache persistant objects

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17502 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6db4350a
......@@ -2699,9 +2699,10 @@ class Base( CopyContainer,
name = ''.join([script_name_begin.replace(' ',''), script_name_end])
script = getattr(self, name, None)
if script is not None:
return script
return name
cached_getattr = CachingMethod(cached_getattr, id='Base__getattr',
cache_factory='erp5_content_long')
# script_id should not be used any more, keep compatibility
if script_id is not None:
LOG('ERP5Type/Base.getTypeBaseMethod',0,
......@@ -2709,9 +2710,9 @@ class Base( CopyContainer,
fallback_script_id=script_id
# Look at a local script which
# can return a new predicate.
script = cached_getattr(self.getPortalType(), method_id)
if script is not None:
return script.__of__(self)
name = cached_getattr(self.getPortalType(), method_id)
if name is not None:
return getattr(self, name)
if fallback_script_id is not None:
return getattr(self, fallback_script_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