Code

Ticket #1535: query.diff

File query.diff, 448 bytes (added by mir@…, 8 years ago)

Russel's patch from the ticket description

Line 
1--- django/db/models/query.py   (revision 2546)
2+++ django/db/models/query.py   (working copy)
3@@ -769,7 +769,7 @@
4     if intermediate_table:
5         joins[backend.quote_name(current_table)] = (
6             backend.quote_name(intermediate_table),
7-            "INNER JOIN",
8+            "LEFT OUTER JOIN",
9             "%s.%s = %s.%s" % \
10                 (backend.quote_name(table),
11                 backend.quote_name(current_opts.pk.column),