diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index a689d2a3e9b9e..792b61f770289 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -1313,7 +1313,7 @@ def get_source_expressions(self): def set_source_expressions(self, exprs): assert all(isinstance(expr, Col) for expr in exprs) self.targets = [col.target for col in exprs] - self.sources = [col.output_field for col in exprs] + self.sources = [col.field for col in exprs] def as_sql(self, compiler, connection): cols_sql = [] @@ -1327,15 +1327,18 @@ def as_sql(self, compiler, connection): return ", ".join(cols_sql), cols_params - @staticmethod - def db_converter(value, *_): - return (tuple(value),) - def relabeled_clone(self, relabels): return self.__class__( relabels.get(self.alias, self.alias), self.targets, self.sources, self.field ) + def resolve_expression(self, *args, **kwargs): + return self + + @staticmethod + def db_converter(value, *_): + return (tuple(value),) + class Ref(Expression): """