summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2018-12-06 10:40:49 -0500
committerTim Graham <timograham@gmail.com>2018-12-06 14:55:35 -0500
commit53269bcaaf1fc2ce4db797d7d8935d98a53494df (patch)
treea9f49ce6d43a546f7e0c827424de6dca5a8fb634 /django
parent88619e6129fd8c6668242f1acc1465ca175d2948 (diff)
Fixed #30011 -- Fixed queries that reuse filtered aggregates.
Thanks Taqi Abbas and Raphael Kimmig for the report.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/aggregates.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py
index cc4b0c52a6..b270640ea5 100644
--- a/django/db/models/aggregates.py
+++ b/django/db/models/aggregates.py
@@ -27,7 +27,7 @@ class Aggregate(Func):
def get_source_expressions(self):
source_expressions = super().get_source_expressions()
if self.filter:
- source_expressions += [self.filter]
+ return source_expressions + [self.filter]
return source_expressions
def set_source_expressions(self, exprs):