diff options
| author | Raphael Michel <mail@raphaelmichel.de> | 2018-08-07 18:08:39 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-08-07 16:47:54 -0400 |
| commit | 155b31d4ec138664d62665eb2d8a442469045b78 (patch) | |
| tree | 46cce56f1cccee3ca2bdb0c7555a286d5cdf3162 /django | |
| parent | 53e85705221dcc5302393aac40f4fa606e2097d3 (diff) | |
Fixed #29648 -- Fixed crash when using subqueries inside datetime truncation functions.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/functions/datetime.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/django/db/models/functions/datetime.py b/django/db/models/functions/datetime.py index 74b88b77ca..1876aa7d5c 100644 --- a/django/db/models/functions/datetime.py +++ b/django/db/models/functions/datetime.py @@ -164,8 +164,6 @@ class TruncBase(TimezoneMixin, Transform): def as_sql(self, compiler, connection): inner_sql, inner_params = compiler.compile(self.lhs) - # Escape any params because trunc_sql will format the string. - inner_sql = inner_sql.replace('%s', '%%s') if isinstance(self.output_field, DateTimeField): tzname = self.get_tzname() sql = connection.ops.datetime_trunc_sql(self.kind, inner_sql, tzname) |
