[1.6.x] Fixed backport of #20740
This commit is contained in:
parent
45fab74561
commit
7f210563ab
|
@ -1131,6 +1131,7 @@ class GenericIPAddressField(Field):
|
|||
def __init__(self, verbose_name=None, name=None, protocol='both',
|
||||
unpack_ipv4=False, *args, **kwargs):
|
||||
self.unpack_ipv4 = unpack_ipv4
|
||||
self.protocol = protocol
|
||||
self.default_validators, invalid_error_message = \
|
||||
validators.ip_address_validators(protocol, unpack_ipv4)
|
||||
self.default_error_messages['invalid'] = invalid_error_message
|
||||
|
|
Loading…
Reference in New Issue