Refs #25265 -- Allowed Query subclasses to build filters.

This commit is contained in:
Erik Cederstrand 2021-10-13 07:31:25 +02:00 committed by GitHub
parent 409060780c
commit 14c8504a37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1760,7 +1760,7 @@ class Query(BaseExpression):
)
"""
# Generate the inner query.
query = Query(self.model)
query = self.__class__(self.model)
query._filtered_relations = self._filtered_relations
filter_lhs, filter_rhs = filter_expr
if isinstance(filter_rhs, OuterRef):