[Erp5-report] r17502 - /erp5/trunk/products/ERP5Type/Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 9 18:33:25 CET 2007
Author: alex
Date: Fri Nov 9 18:33:24 2007
New Revision: 17502
URL: http://svn.erp5.org?rev=17502&view=rev
Log:
should not cache persistant objects
Modified:
erp5/trunk/products/ERP5Type/Base.py
Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=17502&r1=17501&r2=17502&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Fri Nov 9 18:33:24 2007
@@ -2699,9 +2699,10 @@
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 @@
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)
More information about the Erp5-report
mailing list