src/pyams_workflow/content.py
changeset 91 509f88791c41
parent 88 e35f3369d89f
child 94 fef42b125ff9
--- a/src/pyams_workflow/content.py	Wed Jan 09 14:02:56 2019 +0100
+++ b/src/pyams_workflow/content.py	Thu Jan 10 17:27:02 2019 +0100
@@ -157,18 +157,18 @@
             self.push_end_date = None
 
     def is_published(self, check_parent=True):
-        # check is parent is published
+        # check is parent is published and visible in front-office
         if check_parent:
             parent = get_parent(self.__parent__, IWorkflowPublicationSupport, allow_context=False)
             if (parent is not None) and not IWorkflowPublicationInfo(parent).is_published():
                 return False
         # associated workflow?
         workflow = IWorkflow(self.__parent__, None)
-        if (workflow is not None) and not workflow.published_states:
+        if (workflow is not None) and not workflow.visible_states:
             return False
         # check content versions
         versions = IWorkflowVersions(self.__parent__, None)
-        if (versions is not None) and not versions.get_versions(workflow.published_states):
+        if (versions is not None) and not versions.get_versions(workflow.visible_states):
             return False
         now = tztime(datetime.utcnow())
         return (self.publication_effective_date is not None) and \