[Erp5-report] r15844 - /erp5/trunk/products/ERP5Type/patches/CMFCoreSkinnable.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Aug 27 15:37:00 CEST 2007


Author: vincent
Date: Mon Aug 27 15:37:00 2007
New Revision: 15844

URL: http://svn.erp5.org?rev=15844&view=rev
Log:
Volatile attributes are not stable any more at transaction scope with Zope 2.8, so better return the cache after initialisation than entrusting it to a volatile.

Modified:
    erp5/trunk/products/ERP5Type/patches/CMFCoreSkinnable.py

Modified: erp5/trunk/products/ERP5Type/patches/CMFCoreSkinnable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/CMFCoreSkinnable.py?rev=15844&r1=15843&r2=15844&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/CMFCoreSkinnable.py (original)
+++ erp5/trunk/products/ERP5Type/patches/CMFCoreSkinnable.py Mon Aug 27 15:37:00 2007
@@ -51,6 +51,7 @@
             'but does not exist.' % (skin_folder_id, ))
     skin_selection_mapping[selection_name] = skin_list
   portal_skins._v_skin_location_list = skin_selection_mapping
+  return skin_selection_mapping
 
 Skinnable.SkinnableObjectManager.initializeCache = CMFCoreSkinnableSkinnableObjectManager_initializeCache
 
@@ -73,8 +74,7 @@
             skin_selection_mapping = portal_skins._v_skin_location_list
           except AttributeError:
             LOG('Skinnable Monkeypatch __getattr__', 0, 'Initial skin cache fill. This should not happen often. Current thread id:%X' % (get_ident(), ))
-            self.initializeCache()
-            skin_selection_mapping = portal_skins._v_skin_location_list
+            skin_selection_mapping = self.initializeCache()
           try:
             skin_folder_id = skin_selection_mapping[skin_selection_name][name]
           except KeyError:




More information about the Erp5-report mailing list