Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit c4e766c1002465242db01b1da539606f6673ae27 1 parent de81c55
Russell Keith-Magee authored July 30, 2010

Showing 1 changed file with 1 addition and 4 deletions. Show diff stats Hide diff stats

  1. 5  django/db/models/sql/query.py
5  django/db/models/sql/query.py
@@ -1090,10 +1090,7 @@ def add_filter(self, filter_expr, connector=AND, negate=False, trim=False,
1090 1090
                     # exclude the "foo__in=[]" case from this handling, because
1091 1091
                     # it's short-circuited in the Where class.
1092 1092
                     # We also need to handle the case where a subquery is provided
1093  
-                    entry = self.where_class()
1094  
-                    entry.add((Constraint(alias, col, None), 'isnull', True), AND)
1095  
-                    entry.negate()
1096  
-                    self.where.add(entry, AND)
  1093
+                    self.where.add((Constraint(alias, col, None), 'isnull', False), AND)
1097 1094
 
1098 1095
         if can_reuse is not None:
1099 1096
             can_reuse.update(join_list)

0 notes on commit c4e766c

Please sign in to comment.
Something went wrong with that request. Please try again.