Add volatile property
authorThierry Florac <thierry.florac@onf.fr>
Wed, 11 Jul 2018 15:11:25 +0200
changeset 151 211546efa2ad
parent 150 95e0b523b531
child 152 ef23e5fce48a
Add volatile property
src/pyams_portal/page.py
--- a/src/pyams_portal/page.py	Tue Jul 10 08:50:36 2018 +0200
+++ b/src/pyams_portal/page.py	Wed Jul 11 15:11:25 2018 +0200
@@ -27,6 +27,7 @@
 from pyams_portal.template import PortalTemplate
 from pyams_utils.adapter import adapter_config, ContextAdapter, get_annotation_adapter
 from pyams_utils.registry import query_utility
+from pyams_utils.zodb import volatile_property
 from pyramid.threadlocal import get_current_registry
 from zope.container.contained import Contained
 from zope.copy import clone
@@ -50,7 +51,7 @@
     _local_template = FieldProperty(IPortalPage['local_template'])
     _shared_template = FieldProperty(IPortalPage['shared_template'])
 
-    @property
+    @volatile_property
     def can_inherit(self):
         return IPortalContext.providedBy(self.__parent__.__parent__)