From 7be94e033557ec984f53f8a67bd3326ee5a83b4a Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 27 Apr 2017 05:16:19 -0700 Subject: Replaced set |= operator with update() to avoid temporary set. --- django/db/models/sql/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/db/models/sql/query.py') diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 5c3eca0032..a1c1c4be38 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1017,7 +1017,7 @@ class Query: ) # The used_joins for a tuple of expressions is the union of # the used_joins for the individual expressions. - used_joins |= set(k for k, v in self.alias_refcount.items() if v > pre_joins.get(k, 0)) + used_joins.update(k for k, v in self.alias_refcount.items() if v > pre_joins.get(k, 0)) # For Oracle '' is equivalent to null. The check needs to be done # at this stage because join promotion can't be done at compiler # stage. Using DEFAULT_DB_ALIAS isn't nice, but it is the best we -- cgit v1.3