diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 16975fb98c..9d14caf4cb 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -492,8 +492,8 @@ class TemporalSubtraction(CombinedExpression): def as_sql(self, compiler, connection): connection.ops.check_expression_support(self) - lhs = compiler.compile(self.lhs, connection) - rhs = compiler.compile(self.rhs, connection) + lhs = compiler.compile(self.lhs) + rhs = compiler.compile(self.rhs) return connection.ops.subtract_temporals(self.lhs.output_field.get_internal_type(), lhs, rhs)