0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00

Correct references to Page.STATUS_... strings to WorkflowState.STATUS_...

This commit is contained in:
jacobtoppm 2020-02-25 14:57:54 +00:00 committed by Matt Westcott
parent 3a49ef3ffc
commit 512440625b

View File

@ -1754,12 +1754,12 @@ class Page(MultiTableCopyMixin, AbstractPage, index.Indexed, ClusterableModel, m
return workflow return workflow
def workflow_in_progress(self): 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 @property
def current_workflow_state(self): def current_workflow_state(self):
try: 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: except WorkflowState.DoesNotExist:
return return