diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-02 00:20:10 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-02 00:20:10 +0000 |
| commit | 1b615ac46dc496f97b14feaa0bd3e664bc3b4120 (patch) | |
| tree | 407f01451230a3293da86b432a8ee670bd6ff0a2 /django/db/models/sql/query.py | |
| parent | a47bffad177f11c79850c53bc5289ca5a4688c04 (diff) | |
Get the join promotion code (a bit more) correct when constructing joins for ordering.
Yes, this really is a commit that fixes an oversight in a commit that fixed an
oversight. One day I'll get it right.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index cbbbee20ba..edaa223808 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -660,7 +660,8 @@ class Query(object): # Must use left outer joins for nullable fields. must_promote = False for join in joins: - must_promote = self.promote_alias(join, must_promote) + if self.promote_alias(join, must_promote): + must_promote = True # If we get to this point and the field is a relation to another model, # append the default ordering for that model. |
