summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJoshua Phillips <jphillips@imap.cc>2016-04-29 11:44:56 +0100
committerTim Graham <timograham@gmail.com>2016-04-29 10:14:48 -0400
commite0af590bdecfa3a5f013715f01456cfb8fd870dc (patch)
treead71e54339d85a7e33eca5a14a12489fdd9a7807 /django
parentd2338bae786f2fabfd01c30522fda9d79e02eb45 (diff)
[1.9.x] Fixed #26557 -- Converted empty strings to None when saving GenericIPAddressField.
Backport of 4681d65048ca2553895e10c2c492997b0a78ffba from master
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/base/operations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py
index acca12708a..5d3cddff9d 100644
--- a/django/db/backends/base/operations.py
+++ b/django/db/backends/base/operations.py
@@ -497,7 +497,7 @@ class BaseDatabaseOperations(object):
Transforms a string representation of an IP address into the expected
type for the backend driver.
"""
- return value
+ return value or None
def year_lookup_bounds_for_date_field(self, value):
"""