Commit c4e766c1 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #13882 -- Removed an unnecessary nested where clause introduced on...

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
parent de81c551
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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)