From 35b8bc2443fd0a6e67d44d912ff869692d95e11d Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 12 Nov 2014 16:22:08 +0000 Subject: [PATCH] Change 'Field hasn't specified on_delete action' to a warning rather than an error, as per #792 --- wagtail/wagtailcore/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index 4d27f6e536..47b9305c46 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -385,11 +385,11 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed if isinstance(field, models.ForeignKey) and field.name not in field_exceptions: if field.rel.on_delete == models.CASCADE: errors.append( - checks.Error( + checks.Warning( "Field hasn't specified on_delete action", hint="Set on_delete=models.SET_NULL and make sure the field is nullable.", obj=field, - id='wagtailcore.E001', + id='wagtailcore.W001', ) )