Use workflow visible states instead of published states
authorThierry Florac <thierry.florac@onf.fr>
Thu, 10 Jan 2019 17:43:13 +0100
changeset 140 4e5b4d015a06
parent 139 c1399609c5c0
child 141 9f7ad3fcb3b9
Use workflow visible states instead of published states
src/pyams_content_es/shared/view/__init__.py
--- a/src/pyams_content_es/shared/view/__init__.py	Tue Jan 08 14:06:05 2019 +0100
+++ b/src/pyams_content_es/shared/view/__init__.py	Thu Jan 10 17:43:13 2019 +0100
@@ -44,7 +44,7 @@
         # check workflow states
         wf_params = []
         for workflow in registry.getAllUtilitiesRegisteredFor(IWorkflow):
-            wf_params.extend(workflow.published_states)
+            wf_params.extend(workflow.visible_states)
         params &= Q('terms', **{'workflow.status': wf_params})
         # check custom extensions
         for name, adapter in sorted(registry.getAdapters((view,), IViewQueryEsParamsExtension),