summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-07-30 04:06:27 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-07-30 04:06:27 +0000
commitc4e766c1002465242db01b1da539606f6673ae27 (patch)
tree276371a268eba5b58c1006577add1259932de4d5
parentde81c5513c9d1e71965c7ccb5f8e1f62e6a45da6 (diff)
Fixed #13882 -- Removed an unnecessary nested where clause introduced on __isnull queries. Thanks to Alex Gaynor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/models/sql/query.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 0913399e2a..ec477447f3 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1090,10 +1090,7 @@ 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), '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)