summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-07-07 01:12:45 +0000
committerRamiro Morales <cramm0@gmail.com>2011-07-07 01:12:45 +0000
commitb2050ff546da4164f90a795e55d7d8c55981783d (patch)
tree73e8673db5936f671cebaf8870c39e8242aa8fa5 /django/db/models/sql
parentf5c9c2246e4b01f8731550c2a10241ca0e0148e9 (diff)
Fixed #16409 -- Fixed an error condition when using QuerySet only()/defer() on the result of an annotate() call. Thanks jaklaassen AT gmail DOT com and Tai Lee for the reports and Tai for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 841ec12f2d..b5f170eb49 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -169,7 +169,7 @@ class SQLCompiler(object):
if isinstance(col, (list, tuple)):
alias, column = col
table = self.query.alias_map[alias][TABLE_NAME]
- if table in only_load and col not in only_load[table]:
+ if table in only_load and column not in only_load[table]:
continue
r = '%s.%s' % (qn(alias), qn(column))
if with_aliases: