mirror of
https://github.com/django/django.git
synced 2025-08-22 19:44:44 +00:00
Fixed #27828 -- Fixed a crash when subtracting Integer/DurationField from DateField on Oracle/PostgreSQL.
This commit is contained in:
parent
5729272509
commit
d5088f838d
3 changed files with 10 additions and 1 deletions
|
@ -383,7 +383,7 @@ class CombinedExpression(Expression):
|
|||
return DurationExpression(self.lhs, self.connector, self.rhs).as_sql(compiler, connection)
|
||||
if (lhs_output and rhs_output and self.connector == self.SUB and
|
||||
lhs_output.get_internal_type() in {'DateField', 'DateTimeField', 'TimeField'} and
|
||||
lhs_output.get_internal_type() == lhs_output.get_internal_type()):
|
||||
lhs_output.get_internal_type() == rhs_output.get_internal_type()):
|
||||
return TemporalSubtraction(self.lhs, self.rhs).as_sql(compiler, connection)
|
||||
expressions = []
|
||||
expression_params = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue