mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
magic-removal: Fixed #1685 -- order_by no longer breaks when using a custom 'select'. Thanks, feiyu.xie
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c0f3993952
commit
6ed8497f41
@ -427,7 +427,7 @@ class QuerySet(object):
|
|||||||
else:
|
else:
|
||||||
# Use the database table as a column prefix if it wasn't given,
|
# Use the database table as a column prefix if it wasn't given,
|
||||||
# and if the requested column isn't a custom SELECT.
|
# and if the requested column isn't a custom SELECT.
|
||||||
if "." not in col_name and col_name not in [k[0] for k in (self._select or ())]:
|
if "." not in col_name and col_name not in (self._select or ()):
|
||||||
table_prefix = backend.quote_name(opts.db_table) + '.'
|
table_prefix = backend.quote_name(opts.db_table) + '.'
|
||||||
else:
|
else:
|
||||||
table_prefix = ''
|
table_prefix = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user