diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py index cea2a58d391..1800d48fc36 100644 --- a/django/db/models/sql/subqueries.py +++ b/django/db/models/sql/subqueries.py @@ -377,7 +377,7 @@ class DateQuery(Query): for row in rows: date = row[offset] if resolve_columns: - date = self.resolve_columns([date], fields)[0] + date = self.resolve_columns(row, fields)[offset] elif needs_string_cast: date = typecast_timestamp(str(date)) yield date