mirror of
https://github.com/django/django.git
synced 2025-07-30 16:44:30 +00:00
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
This commit is contained in:
parent
f5c9c2246e
commit
b2050ff546
3 changed files with 9 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue