mirror of
https://github.com/django/django.git
synced 2025-07-28 15:44:20 +00:00
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:
parent
a75dc3406f
commit
4e5c20b78b
2 changed files with 28 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue