From 61410408133a210a64c43d93160ab5a7cac58097 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Tue, 15 Aug 2017 18:43:47 +0500 Subject: [PATCH] Avoided creation of temporary set in Query.append_annotation_mask(). --- django/db/models/sql/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 5fd1d588310..b17a33393e3 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1784,7 +1784,7 @@ class Query: def append_annotation_mask(self, names): if self.annotation_select_mask is not None: - self.set_annotation_mask(set(names).union(self.annotation_select_mask)) + self.set_annotation_mask(self.annotation_select_mask.union(names)) def set_extra_mask(self, names): """