|
@@ -128,7 +128,7 @@ class SQLCompiler:
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
for expr in self.query.group_by:
|
|
|
if not hasattr(expr, "as_sql"):
|
|
@@ -148,9 +148,7 @@ class SQLCompiler:
|
|
|
continue
|
|
|
if alias:
|
|
|
aliased_exprs[expr] = alias
|
|
|
- cols = expr.get_group_by_cols()
|
|
|
- for col in cols:
|
|
|
- expressions.append(col)
|
|
|
+ expressions.extend(expr.get_group_by_cols())
|
|
|
if not self._meta_ordering:
|
|
|
for expr, (sql, params, is_ref) in order_by:
|
|
|
|