1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +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:
Adrian Holovaty 2006-05-01 23:27:46 +00:00
parent c0f3993952
commit 6ed8497f41

View File

@ -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 = ''