From 512440625bfd939ee9a3956c36f59ec0c5c135fc Mon Sep 17 00:00:00 2001 From: jacobtoppm Date: Tue, 25 Feb 2020 14:57:54 +0000 Subject: [PATCH] Correct references to Page.STATUS_... strings to WorkflowState.STATUS_... --- wagtail/core/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wagtail/core/models.py b/wagtail/core/models.py index 4c5731e577..04b76d1bd0 100644 --- a/wagtail/core/models.py +++ b/wagtail/core/models.py @@ -1754,12 +1754,12 @@ class Page(MultiTableCopyMixin, AbstractPage, index.Indexed, ClusterableModel, m return workflow def workflow_in_progress(self): - return WorkflowState.objects.filter(page=self, status=self.STATUS_IN_PROGRESS).exists() + return WorkflowState.objects.filter(page=self, status=WorkflowState.STATUS_IN_PROGRESS).exists() @property def current_workflow_state(self): try: - return WorkflowState.objects.get(page=self, status=self.STATUS_IN_PROGRESS) + return WorkflowState.objects.get(page=self, status=WorkflowState.STATUS_IN_PROGRESS) except WorkflowState.DoesNotExist: return