summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorDenis Moskalets <denya.msk@gmail.com>2013-12-03 13:24:45 +0400
committerTim Graham <timograham@gmail.com>2013-12-18 09:34:53 -0500
commitd4e578d0f64971483ded49f9cae460ea174b5138 (patch)
treefd15d03814a02079a9a7e260e4648e8e0f2b16cd /django
parent2fd7fc134cf0c0685ceac22fd858509aa43f819f (diff)
Fixed #21552 -- Allowed the use of None for the iexact lookup.
Thanks Anubhav Joshi for the documentation.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 43026d2d82..223e516d56 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1031,7 +1031,7 @@ class Query(object):
# Interpret '__exact=None' as the sql 'is NULL'; otherwise, reject all
# uses of None as a query value.
if value is None:
- if lookup_type != 'exact':
+ if lookup_type not in ('exact', 'iexact'):
raise ValueError("Cannot use None as a query value")
lookup_type = 'isnull'
value = True