mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #16246 -- Fixed GenericIPAddressField tests on PostgreSQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -965,8 +965,8 @@ class GenericIPAddressField(CharField):
|
||||
super(GenericIPAddressField, self).__init__(*args, **kwargs)
|
||||
|
||||
def to_python(self, value):
|
||||
if not value:
|
||||
return ''
|
||||
if value in validators.EMPTY_VALUES:
|
||||
return u''
|
||||
if value and ':' in value:
|
||||
return clean_ipv6_address(value,
|
||||
self.unpack_ipv4, self.error_messages['invalid'])
|
||||
|
||||
Reference in New Issue
Block a user