diff options
| author | Simon Charette <charette.s@gmail.com> | 2020-01-02 11:33:01 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-01-03 10:35:08 +0100 |
| commit | 9bcbcd599abac91ea853b2fe10b784ba32df043e (patch) | |
| tree | aede04abf962e71b9e93c6628176aad75f895fa8 /django/db/backends/base | |
| parent | 372eaa395f167c038e546c6be554c96014d40109 (diff) | |
Fixed #31133 -- Fixed crash when subtracting against a subquery annotation.
The subtract_temporals() database operation was not handling expressions
returning SQL params in mixed database types.
Regression in 35431298226165986ad07e91f9d3aca721ff38ec.
Thanks Reupen Shah for the report.
Diffstat (limited to 'django/db/backends/base')
| -rw-r--r-- | django/db/backends/base/operations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py index d9d59b4109..43220a18bc 100644 --- a/django/db/backends/base/operations.py +++ b/django/db/backends/base/operations.py @@ -626,7 +626,7 @@ class BaseDatabaseOperations: if self.connection.features.supports_temporal_subtraction: lhs_sql, lhs_params = lhs rhs_sql, rhs_params = rhs - return "(%s - %s)" % (lhs_sql, rhs_sql), lhs_params + rhs_params + return '(%s - %s)' % (lhs_sql, rhs_sql), (*lhs_params, *rhs_params) raise NotSupportedError("This backend does not support %s subtraction." % internal_type) def window_frame_start(self, start): |
