From c44376c613333cce36e830eb846b4cdcecabaf6c Mon Sep 17 00:00:00 2001 From: Aider Ibragimov Date: Wed, 4 Mar 2015 14:17:58 +0300 Subject: [PATCH] remove unnecessary check --- rest_framework/fields.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d0fcd988b..d19231a2f 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -669,17 +669,13 @@ class IPAddressField(CharField): self.validators.extend(validators) def to_internal_value(self, data): - if data == '' and self.allow_blank: - return '' - data = data.strip() - if data and ':' in data: try: return clean_ipv6_address(data, self.unpack_ipv4) except DjangoValidationError: self.fail('invalid', value=data) - return data + return super(IPAddressField, self).to_internal_value(data) # Number types...