Commit 1b615ac4 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

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
parent a47bffad
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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.