Fixed #28621 -- Fixed crash of annotations with OuterRef.

This commit is contained in:
Mariusz Felisiak 2019-03-27 08:24:05 +01:00 committed by GitHub
parent c4447ad231
commit 2a431db0f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -527,6 +527,8 @@ class ResolvedOuterRef(F):
In this case, the reference to the outer query has been resolved because
the inner query has been used as a subquery.
"""
contains_aggregate = False
def as_sql(self, *args, **kwargs):
raise ValueError(
'This queryset contains a reference to an outer query and may '