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

Retrieve tasks in order they are on the workflow

This commit is contained in:
Karl Hobley 2020-02-21 09:23:40 +00:00 committed by Matt Westcott
parent 35cb4ab0f5
commit 623ea70ffc

View File

@ -2699,7 +2699,7 @@ class Workflow(ClusterableModel):
@property
def tasks(self):
return Task.objects.filter(workflow_tasks__workflow=self)
return Task.objects.filter(workflow_tasks__workflow=self).order_by('workflow_tasks__sort_order')
@transaction.atomic
def start(self, page, user):