Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 6ed8497f41f2919d4a62efe9b01c9dc034634090 1 parent c0f3993
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/query.py
View
2  django/db/models/query.py
@@ -427,7 +427,7 @@ def _get_sql_clause(self):
else:
# Use the database table as a column prefix if it wasn't given,
# 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) + '.'
else:
table_prefix = ''
Please sign in to comment.
Something went wrong with that request. Please try again.