Commit 752cf9f3 authored by Vincent Pelletier's avatar Vincent Pelletier

Volatile attributes are not stable any more at transaction scope with Zope...

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.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15844 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 302cd513
......@@ -51,6 +51,7 @@ def CMFCoreSkinnableSkinnableObjectManager_initializeCache(self):
'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 @@ def CMFCoreSkinnableSkinnableObjectManager___getattr__(self, name):
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:
......
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