Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored May 01, 2006

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/models/query.py
2  django/db/models/query.py
@@ -427,7 +427,7 @@ def _get_sql_clause(self):
427 427
                 else:
428 428
                     # Use the database table as a column prefix if it wasn't given,
429 429
                     # and if the requested column isn't a custom SELECT.
430  
-                    if "." not in col_name and col_name not in [k[0] for k in (self._select or ())]:
  430
+                    if "." not in col_name and col_name not in (self._select or ()):
431 431
                         table_prefix = backend.quote_name(opts.db_table) + '.'
432 432
                     else:
433 433
                         table_prefix = ''

0 notes on commit 6ed8497

Please sign in to comment.
Something went wrong with that request. Please try again.