diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-07-31 01:01:45 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-07-31 13:31:04 -0400 |
| commit | 0baea920c865ae2d40a4e1d9281e25327fc0dbe5 (patch) | |
| tree | 02ed8e20723e8ea3949660525df88b19b4031047 /django/db/models/sql | |
| parent | e3bd328b0f8cacea06cb94dfa63996144279df52 (diff) | |
Fixed #28453 -- Made __exact=None lookup use transforms.
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 48bbd7c851..5e262d1765 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -984,7 +984,8 @@ class Query: if value is None: if lookups[-1] not in ('exact', 'iexact'): raise ValueError("Cannot use None as a query value") - return True, ['isnull'], used_joins + lookups[-1] = 'isnull' + return True, lookups, used_joins elif hasattr(value, 'resolve_expression'): pre_joins = self.alias_refcount.copy() value = value.resolve_expression(self, reuse=can_reuse, allow_joins=allow_joins) |
