Guidance to acknowledge that models.PROTECT is also fine.

pull/2449/merge
Benjamin Bach 2016-01-25 17:23:27 +01:00 zatwierdzone przez Matt Westcott
rodzic 6c53a439a5
commit 512b96aa82
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -530,7 +530,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
errors.append(
checks.Warning(
"Field hasn't specified on_delete action",
hint="Set on_delete=models.SET_NULL and make sure the field is nullable.",
hint="Set on_delete=models.SET_NULL and make sure the field is nullable or set on_delete=models.PROTECT. Wagtail does not allow simple database CASCADE because it will corrupt its tree storage.",
obj=field,
id='wagtailcore.W001',
)