mirror of
https://github.com/django/django.git
synced 2025-08-22 03:24:21 +00:00
Fixed #34368 -- Made subquery raise NotSupportedError when referencing outer window expression.
Regression in f387d024fc
.
Co-authored-by: Jannis Vajen <jvajen@gmail.com>
This commit is contained in:
parent
b15f162f25
commit
c67ea79aa9
3 changed files with 25 additions and 1 deletions
|
@ -857,6 +857,11 @@ class ResolvedOuterRef(F):
|
|||
|
||||
def resolve_expression(self, *args, **kwargs):
|
||||
col = super().resolve_expression(*args, **kwargs)
|
||||
if col.contains_over_clause:
|
||||
raise NotSupportedError(
|
||||
f"Referencing outer query window expression is not supported: "
|
||||
f"{self.name}."
|
||||
)
|
||||
# FIXME: Rename possibly_multivalued to multivalued and fix detection
|
||||
# for non-multivalued JOINs (e.g. foreign key fields). This should take
|
||||
# into account only many-to-many and one-to-many relationships.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue