Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.2.X] Fixed #13882 -- Removed an unnecessary nested where clause in…

…troduced on __isnull queries. Thanks to Alex Gaynor for the report and patch.

Backport of r13456 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit dc449e9664ff89b2acab9934a5589e04061dc4ec 1 parent c61811a
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 django/db/models/sql/query.py
View
5 django/db/models/sql/query.py
@@ -1090,10 +1090,7 @@ def add_filter(self, filter_expr, connector=AND, negate=False, trim=False,
# 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), 'isnull', True), AND)
- entry.negate()
- self.where.add(entry, AND)
+ self.where.add((Constraint(alias, col, None), 'isnull', False), AND)
if can_reuse is not None:
can_reuse.update(join_list)
Please sign in to comment.
Something went wrong with that request. Please try again.