summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/aggregates/mixins.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/postgres/aggregates/mixins.py')
-rw-r--r--django/contrib/postgres/aggregates/mixins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/postgres/aggregates/mixins.py b/django/contrib/postgres/aggregates/mixins.py
index 4625738beb..40318b7b31 100644
--- a/django/contrib/postgres/aggregates/mixins.py
+++ b/django/contrib/postgres/aggregates/mixins.py
@@ -3,7 +3,7 @@ from django.db.models.expressions import F, OrderBy
class OrderableAggMixin:
- def __init__(self, expression, ordering=(), **extra):
+ def __init__(self, *expressions, ordering=(), **extra):
if not isinstance(ordering, (list, tuple)):
ordering = [ordering]
ordering = ordering or []
@@ -12,7 +12,7 @@ class OrderableAggMixin:
(OrderBy(F(o[1:]), descending=True) if isinstance(o, str) and o[0] == '-' else o)
for o in ordering
)
- super().__init__(expression, **extra)
+ super().__init__(*expressions, **extra)
self.ordering = self._parse_expressions(*ordering)
def resolve_expression(self, *args, **kwargs):