diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-08-09 21:22:37 +0000 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-08-09 21:22:37 +0000 |
commit | 6001ba016a3db4701d56abc6d30868d4e5d88dbf (patch) | |
tree | 7a42c57d802484300c2384d3cd3a968de1804383 /django/db/models/sql/query.py | |
parent | c7bd48cb9f645e5ff07d1e68b86130e3bb2b043f (diff) | |
download | django-soc2010/query-refactor.tar.gz |
[soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflictsarchive/soc2010/query-refactorsoc2010/query-refactor
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql/query.py')
-rw-r--r-- | django/db/models/sql/query.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 6836337429..6037ae8842 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1076,14 +1076,9 @@ class Query(object): # exclude the "foo__in=[]" case from this handling, because # it's short-circuited in the Where class. # We also need to handle the case where a subquery is provided - entry = self.where_class() - entry.add(( - Constraint(alias, col, None, eliminatable_if=lambda connection: not getattr(connection.features, "sql_nulls", True)), - 'isnull', - True - ), AND) - entry.negate() - self.where.add(entry, AND) + self.where.add( + (Constraint(alias, col, None, eliminatable_if=lambda connection: not getattr(connection.features, "sql_nulls", True)), 'isnull', False), AND + ) if can_reuse is not None: can_reuse.update(join_list) |