mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Add unique together on WorkflowTask for 'workflow' and 'task' to avoid duplicates making TaskState queries difficult in future
This commit is contained in:
parent
3db9779260
commit
00ba5810fc
@ -2407,7 +2407,7 @@ class WorkflowTask(Orderable):
|
||||
task = models.ForeignKey('Task', on_delete=models.CASCADE, verbose_name=_('task'), related_name='workflow_tasks')
|
||||
|
||||
class Meta:
|
||||
unique_together = [('workflow', 'sort_order')]
|
||||
unique_together = [('workflow', 'sort_order'), ('workflow', 'task')]
|
||||
verbose_name = _('workflow task order')
|
||||
verbose_name_plural = _('workflow task orders')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user