0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Get STATUS_CHOICES from Task when annotating all_tasks_with_status (#6147)

This commit is contained in:
jacobtoppm 2020-06-18 16:07:39 +01:00 committed by Matt Westcott
parent 2607bf43d0
commit 903fd5ce11

View File

@ -2984,7 +2984,7 @@ class WorkflowState(models.Model):
)
# Manually annotate status_display
status_choices = dict(self.STATUS_CHOICES)
status_choices = dict(TaskState.STATUS_CHOICES)
for task in tasks:
task.status_display = status_choices.get(task.status, _("Not started"))