Use new workflow "visible_states" attribute to get access to content's visible version
authorThierry Florac <thierry.florac@onf.fr>
Thu, 10 Jan 2019 17:23:38 +0100
changeset 84 3a99c9471fac
parent 83 daa1f96ba2b4
child 85 40f6c30c21d3
Use new workflow "visible_states" attribute to get access to content's visible version
src/pyams_sequence/reference.py
--- a/src/pyams_sequence/reference.py	Fri Dec 14 18:36:51 2018 +0100
+++ b/src/pyams_sequence/reference.py	Thu Jan 10 17:23:38 2019 +0100
@@ -85,7 +85,7 @@
         versions = IWorkflowVersions(content, None)
         if versions is not None:
             workflow = IWorkflow(content)
-            visible_versions = versions.get_versions(workflow.published_states, sort=True)
+            visible_versions = versions.get_versions(workflow.visible_states, sort=True)
             if visible_versions:
                 return visible_versions[-1]
             else: