1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

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
This commit is contained in:
Malcolm Tredinnick
2008-09-01 02:43:55 +00:00
parent 4480645ac3
commit 2d7feda05c
3 changed files with 97 additions and 1 deletions

View File

@@ -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.