Fix a couple of magic strings

pull/6257/head
Karl Hobley 2020-02-24 09:23:11 +00:00 zatwierdzone przez Matt Westcott
rodzic 16b6221627
commit 3a49ef3ffc
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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='in_progress').exists()
return WorkflowState.objects.filter(page=self, status=self.STATUS_IN_PROGRESS).exists()
@property
def current_workflow_state(self):
try:
return WorkflowState.objects.get(page=self, status='in_progress')
return WorkflowState.objects.get(page=self, status=self.STATUS_IN_PROGRESS)
except WorkflowState.DoesNotExist:
return