From 35b8bc2443fd0a6e67d44d912ff869692d95e11d Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 12 Nov 2014 16:22:08 +0000 Subject: [PATCH 1/2] 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 4d27f6e53..47b9305c4 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', ) ) From fbfa60c45478c07bb62b288de90941af804db861 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 12 Nov 2014 16:23:42 +0000 Subject: [PATCH 2/2] release note for 35b8bc2 --- CHANGELOG.txt | 1 + docs/releases/0.8.2.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6074c8fd4..d9899672f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Changelog * Fix: Added missing jQuery UI sprite files, causing collectstatic to throw errors (most reported on Heroku) * Fix: Page system check for on_delete actions of ForeignKeys was throwing false positives when page class decends from an abstract class (Alejandro Giacometti) + * Fix: Page system check for on_delete actions of ForeignKeys now only raises warnings, not errors * Fixed a regression where form builder submissions containing a number field would fail with a JSON serialisation error * Fix: Resizing an image with a focal point equal to the image size would result in a divide-by-zero error * Fix: Elasticsearch configuration now supports specifying HTTP authentication parameters as part of the URL, and defaults to ports 80 (HTTP) and 443 (HTTPS) if port number not specified diff --git a/docs/releases/0.8.2.rst b/docs/releases/0.8.2.rst index 41f980ed5..20072c7ee 100644 --- a/docs/releases/0.8.2.rst +++ b/docs/releases/0.8.2.rst @@ -16,6 +16,7 @@ Bug fixes * Added missing jQuery UI sprite files, causing collectstatic to throw errors (most reported on Heroku) * Page system check for on_delete actions of ForeignKeys was throwing false positives when page class decends from an abstract class (Alejandro Giacometti) + * Page system check for on_delete actions of ForeignKeys now only raises warnings, not errors * Fixed a regression where form builder submissions containing a number field would fail with a JSON serialisation error * Resizing an image with a focal point equal to the image size would result in a divide-by-zero error * Elasticsearch configuration now supports specifying HTTP authentication parameters as part of the URL, and defaults to ports 80 (HTTP) and 443 (HTTPS) if port number not specified