From 19f1321fa44c45a737da0023c2122e711057b554 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 24 Oct 2016 11:27:41 -0400 Subject: [PATCH] Removed unused loop in Query.change_aliases(). Unknown if it was ever used. --- django/db/models/sql/query.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index aeb722ba50..f82eca3774 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -809,10 +809,6 @@ class Query(object): if alias == old_alias: table_aliases[pos] = new_alias break - for pos, alias in enumerate(self.tables): - if alias == old_alias: - self.tables[pos] = new_alias - break self.external_aliases = {change_map.get(alias, alias) for alias in self.external_aliases}