Skip to content

Commit

Permalink
magic-removal: Fixed #1685 -- order_by no longer breaks when using a …
Browse files Browse the repository at this point in the history
…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
adrianholovaty committed May 1, 2006
1 parent c0f3993 commit 6ed8497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/query.py
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 6ed8497

Please sign in to comment.