diff --git a/wagtail/core/models.py b/wagtail/core/models.py index e696aca967..12dae1ae00 100644 --- a/wagtail/core/models.py +++ b/wagtail/core/models.py @@ -357,6 +357,7 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase): 'Workflow', related_name='pages', verbose_name=_('workflow'), + on_delete=models.SET_NULL, null=True ) @@ -2457,6 +2458,8 @@ class Workflow(models.Model): return self.name class Meta: - unique_together = [('name', 'tasks')] verbose_name = _('workflow') verbose_name_plural = _('workflows') + +class GroupApprovalTask(Task): + group = models.ForeignKey(Group, on_delete=models.CASCADE, verbose_name=_('group'))