Merge branch 'fix/foreign_key_warning_only'

This commit is contained in:
Matt Westcott 2014-11-12 16:24:21 +00:00
commit f1111f640e
3 changed files with 4 additions and 2 deletions

View file

@ -12,6 +12,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

View file

@ -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

View file

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