summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-09-01 02:43:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-09-01 02:43:55 +0000
commit2d7feda05c45f38a04a6ee7ec93842cfea7aff43 (patch)
tree0f8453107957428e471ee34c6e4fd8f4ee4fe5b3 /django/db/models/sql
parent4480645ac3b4d3b72ee2880c774f849965d555d4 (diff)
Fixed #7512 -- Fixed an oversight when I first fixed ordering on nullable
foreign keys (r7761). Thanks to George Vilches for the test case here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/query.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 166e818e56..2e3169a3c0 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -658,8 +658,9 @@ class Query(object):
self.ref_alias(alias)
# Must use left outer joins for nullable fields.
+ must_promote = False
for join in joins:
- self.promote_alias(join)
+ must_promote = self.promote_alias(join, must_promote)
# If we get to this point and the field is a relation to another model,
# append the default ordering for that model.