From eaf9764d3bb25970da89de5799d8d308715628ba Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 15 Sep 2020 11:40:59 +0200 Subject: Fixed #32007 -- Fixed queryset crash with Q() annotation and aggregation. Thanks Gordon Wrigley for the report. Regression in 8a6df55f2dd5131282084a4edfd48f63fbf8c69a. --- django/db/models/sql/where.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/db/models/sql/where.py') diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py index bf0828dc8b..795eff8395 100644 --- a/django/db/models/sql/where.py +++ b/django/db/models/sql/where.py @@ -159,6 +159,9 @@ class WhereNode(tree.Node): clone.relabel_aliases(change_map) return clone + def copy(self): + return self.clone() + @classmethod def _contains_aggregate(cls, obj): if isinstance(obj, tree.Node): -- cgit v1.3