From 466575bee60d2575dc5fb69c6e19e1fab3fd6803 Mon Sep 17 00:00:00 2001 From: Andrea Grandi Date: Thu, 26 Mar 2015 18:14:53 +0000 Subject: [PATCH] Lowercase the input --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d19231a2f..1731c5f24 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -662,7 +662,7 @@ class IPAddressField(CharField): } def __init__(self, protocol='both', unpack_ipv4=False, **kwargs): - self.protocol = protocol + self.protocol = protocol.lower() self.unpack_ipv4 = unpack_ipv4 super(IPAddressField, self).__init__(**kwargs) validators, error_message = ip_address_validators(protocol, unpack_ipv4)