From 6ed8497f41f2919d4a62efe9b01c9dc034634090 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 1 May 2006 23:27:46 +0000 Subject: [PATCH] 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 --- django/db/models/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/query.py b/django/db/models/query.py index edc16e6fc1..365ead2a3a 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -427,7 +427,7 @@ class QuerySet(object): 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 = ''