mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-02 14:20:33 +00:00
Change 'Field hasn't specified on_delete action' to a warning rather than an error, as per #792
This commit is contained in:
parent
0e38ecea5b
commit
35b8bc2443
1 changed files with 2 additions and 2 deletions
|
|
@ -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',
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue