summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/aggregates/mixins.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-10-12 13:02:12 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-10-14 20:56:04 +0200
commit1f31027bb3ad460864fbcbbb89eeb328c0a2f184 (patch)
treec7a3c4f8e7ebc044a2c579c9dd79e8a4701ab9d9 /django/contrib/postgres/aggregates/mixins.py
parent1d650ad019c1ab8e73d1e5b2587bb232c8ab35b6 (diff)
downloaddjango-1f31027bb3ad460864fbcbbb89eeb328c0a2f184.tar.gz
Refs #32096 -- Fixed crash of ArrayAgg/StringAgg/JSONBAgg with ordering over JSONField key transforms.
Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd. Thanks Igor Jerosimić for the report.
Diffstat (limited to 'django/contrib/postgres/aggregates/mixins.py')
-rw-r--r--django/contrib/postgres/aggregates/mixins.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/postgres/aggregates/mixins.py b/django/contrib/postgres/aggregates/mixins.py
index 2ab9052467..f2ba5c4439 100644
--- a/django/contrib/postgres/aggregates/mixins.py
+++ b/django/contrib/postgres/aggregates/mixins.py
@@ -24,7 +24,7 @@ class OrderableAggMixin:
ordering_params = []
ordering_expr_sql = []
for expr in self.ordering:
- expr_sql, expr_params = expr.as_sql(compiler, connection)
+ expr_sql, expr_params = compiler.compile(expr)
ordering_expr_sql.append(expr_sql)
ordering_params.extend(expr_params)
sql, sql_params = super().as_sql(compiler, connection, ordering=(