Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 181e3bd

Browse files
jacobtylerwallssarahboyce
authored andcommitted
Refs #36210 -- Corrected output_field comparison in Subquery.resolve_expression().
Regression in fd569dd.
1 parent fa804d0 commit 181e3bd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

django/db/models/expressions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,9 @@ def resolve_expression(self, *args, **kwargs):
18041804
self.output_field
18051805
except AttributeError:
18061806
return resolved.query
1807-
if self.output_field and self.output_field != resolved.query.output_field:
1807+
if self.output_field and type(self.output_field) is not type(
1808+
resolved.query.output_field
1809+
):
18081810
return ExpressionWrapper(resolved.query, output_field=self.output_field)
18091811
return resolved.query
18101812
return resolved

0 commit comments

Comments
 (0)