mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #20484 -- Added model validation for GenericIPAddressField
GenericIPAddressField must not allow blank for NOT NULL fields Thanks Erik Romijn.
This commit is contained in:
@@ -601,6 +601,13 @@ Miscellaneous
|
||||
``django.contrib.admindocs.middleware`` because it is an implementation
|
||||
detail of admindocs, proven not to be reusable in general.
|
||||
|
||||
* :class:`~django.db.models.GenericIPAddressField` will now only allow
|
||||
``blank`` values if ``null`` values are also allowed. Creating a
|
||||
``GenericIPAddressField`` where ``blank`` is allowed but ``null`` is not
|
||||
will trigger a model validation error because ``blank`` values are always
|
||||
stored as ``null``. Previously, storing a ``blank`` value in a field which
|
||||
did not allow ``null`` would cause a database exception at runtime.
|
||||
|
||||
Features deprecated in 1.6
|
||||
==========================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user