Code

Ticket #15316: 15316.diff

File 15316.diff, 608 bytes (added by ethlinn, 3 years ago)

the patch without other patches (the previous one was generated badly)

Line 
1Index: django/db/models/sql/query.py
2===================================================================
3--- django/db/models/sql/query.py       (revision 16436)
4+++ django/db/models/sql/query.py       (working copy)
5@@ -1075,7 +1075,7 @@
6                     can_reuse)
7             return
8 
9-        if (lookup_type == 'isnull' and value is True and not negate and
10+        if (lookup_type == 'isnull' and not negate and
11                 len(join_list) > 1):
12             # If the comparison is against NULL, we may need to use some left
13             # outer joins when creating the join chain. This is only done when