diff options
| author | Denis Moskalets <denya.msk@gmail.com> | 2013-12-03 13:24:45 +0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-12-18 09:34:53 -0500 |
| commit | d4e578d0f64971483ded49f9cae460ea174b5138 (patch) | |
| tree | fd15d03814a02079a9a7e260e4648e8e0f2b16cd /django | |
| parent | 2fd7fc134cf0c0685ceac22fd858509aa43f819f (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.py | 2 |
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 |
