Fixed #11916 -- Corrected handling of aggregation when there is a subquery provided in an extra(select=) clause. Thanks to jaklaassen@gmail.com for the report, and to tobias, paluh, Karen Tracey and Ian Kelly for their work on the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-03-31 13:43:22 +00:00
parent a75dc3406f
commit 4e5c20b78b
2 changed files with 28 additions and 4 deletions

View file

@ -484,7 +484,7 @@ class SQLCompiler(object):
elif hasattr(col, 'as_sql'):
result.append(col.as_sql(qn))
else:
result.append(str(col))
result.append('(%s)' % str(col))
return result, params
def fill_related_selections(self, opts=None, root_alias=None, cur_depth=1,