diff options
author | Ömer Faruk Abacı <omerfabaci@gmail.com> | 2021-12-08 10:11:12 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-12-08 21:16:24 +0100 |
commit | f1bfdff6907e093ea6ce12e775f93add349adde7 (patch) | |
tree | 52f2a3213ea7673b6f079cf3cb4d1b9a9c1dcabe /django/db/models/sql/query.py | |
parent | cb383753c0e0eb52306e1024d32a782549c27e61 (diff) | |
download | django-f1bfdff6907e093ea6ce12e775f93add349adde7.tar.gz |
Refs #33319 -- Added comment about keys/values assertion in Query.change_aliases().
Diffstat (limited to 'django/db/models/sql/query.py')
-rw-r--r-- | django/db/models/sql/query.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index aaf35ee37c..fe8ac873b1 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -846,6 +846,9 @@ class Query(BaseExpression): relabelling any references to them in select columns and the where clause. """ + # If keys and values of change_map were to intersect, an alias might be + # updated twice (e.g. T4 -> T5, T5 -> T6, so also T4 -> T6) depending + # on their order in change_map. assert set(change_map).isdisjoint(change_map.values()) # 1. Update references in "select" (normal columns plus aliases), |