Permalink
Browse files

[1.6.x] Fixed backport of #20740

  • Loading branch information...
1 parent 45fab74 commit 7f210563ab90d4d3957e7e1efc5b102777357e8b @timgraham timgraham committed Jul 12, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 django/db/models/fields/__init__.py
View
1 django/db/models/fields/__init__.py
@@ -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

0 comments on commit 7f21056

Please sign in to comment.