mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #31659 -- Made ExpressionWrapper preserve output_field for combined expressions.
Regression in df32fd42b8.
Thanks Simon Charette for the review.
This commit is contained in:
@@ -857,6 +857,9 @@ class ExpressionWrapper(Expression):
|
||||
|
||||
def __init__(self, expression, output_field):
|
||||
super().__init__(output_field=output_field)
|
||||
if getattr(expression, '_output_field_or_none', True) is None:
|
||||
expression = expression.copy()
|
||||
expression.output_field = output_field
|
||||
self.expression = expression
|
||||
|
||||
def set_source_expressions(self, exprs):
|
||||
|
||||
Reference in New Issue
Block a user