mirror of
https://github.com/django/django.git
synced 2025-09-28 13:04:54 +00:00
Simplified SQLCompiler.get_group_by() a bit.
This commit is contained in:
parent
0b78ac3fc7
commit
0d3ccf7512
1 changed files with 2 additions and 4 deletions
|
@ -148,9 +148,7 @@ class SQLCompiler:
|
||||||
continue
|
continue
|
||||||
if alias:
|
if alias:
|
||||||
aliased_exprs[expr] = alias
|
aliased_exprs[expr] = alias
|
||||||
cols = expr.get_group_by_cols()
|
expressions.extend(expr.get_group_by_cols())
|
||||||
for col in cols:
|
|
||||||
expressions.append(col)
|
|
||||||
if not self._meta_ordering:
|
if not self._meta_ordering:
|
||||||
for expr, (sql, params, is_ref) in order_by:
|
for expr, (sql, params, is_ref) in order_by:
|
||||||
# Skip references to the SELECT clause, as all expressions in
|
# Skip references to the SELECT clause, as all expressions in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue