mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +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:
@@ -95,7 +95,7 @@ class GenericIPAddressTestModel(models.Model):
|
||||
blank=True, null=True)
|
||||
|
||||
class GenericIPAddrUnpackUniqueTest(models.Model):
|
||||
generic_v4unpack_ip = models.GenericIPAddressField(blank=True, unique=True, unpack_ipv4=True)
|
||||
generic_v4unpack_ip = models.GenericIPAddressField(null=True, blank=True, unique=True, unpack_ipv4=True)
|
||||
|
||||
|
||||
# A model can't have multiple AutoFields
|
||||
|
||||
Reference in New Issue
Block a user