mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #7371 -- Fixed an edge case when ordering on related models.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -626,6 +626,11 @@ class Query(object):
|
||||
alias, False)
|
||||
alias = joins[-1]
|
||||
col = target.column
|
||||
if not field.rel:
|
||||
# To avoid inadvertent trimming of a necessary alias, use the
|
||||
# refcount to show that we are referencing a non-relation field on
|
||||
# the model.
|
||||
self.ref_alias(alias)
|
||||
|
||||
# Must use left outer joins for nullable fields.
|
||||
for join in joins:
|
||||
|
||||
Reference in New Issue
Block a user