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:
parent
3a49ef3ffc
commit
512440625b
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user