Guidance to acknowledge that models.PROTECT is also fine.

This commit is contained in:
Benjamin Bach 2016-01-25 17:23:27 +01:00 committed by Matt Westcott
parent 6c53a439a5
commit 512b96aa82

View file

@ -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',
)