Update 'is_using_context' to return True if content type is extracted from context
authorThierry Florac <thierry.florac@onf.fr>
Thu, 15 Mar 2018 12:01:04 +0100
changeset 485 252eeec4e59f
parent 484 ddbb2278250b
child 486 cb67e71dafff
Update 'is_using_context' to return True if content type is extracted from context
src/pyams_content/shared/view/__init__.py
--- a/src/pyams_content/shared/view/__init__.py	Thu Mar 15 09:32:48 2018 +0100
+++ b/src/pyams_content/shared/view/__init__.py	Thu Mar 15 12:01:04 2018 +0100
@@ -67,6 +67,8 @@
 
     @property
     def is_using_context(self):
+        if self.select_context_type:
+            return True
         registry = get_global_registry()
         for name, adapter in registry.getAdapters((self,), IViewSettings):
             if not name: