1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

Fixed #36442 -- Cloned FilteredRelation before rename_prefix_from_q.

This commit is contained in:
viliam mihalik
2025-06-05 23:53:01 +02:00
committed by Sarah Boyce
parent 95a5c9b794
commit bd65e82831
2 changed files with 23 additions and 0 deletions

View File

@@ -1723,6 +1723,7 @@ class Query(BaseExpression):
"relations deeper than the relation_name (got %r for "
"%r)." % (lookup, filtered_relation.relation_name)
)
filtered_relation = filtered_relation.clone()
filtered_relation.condition = rename_prefix_from_q(
filtered_relation.relation_name,
alias,