* stage: Unreviewed => Accepted
Comment:
Thanks for the report. SQLite is also affected. As far as I'm aware, it's
enough to pass a substring length, e.g.:
{{{#!diff
diff --git a/django/db/models/functions/text.py
b/django/db/models/functions/text.py
index fba2840c4b..f717213636 100644
--- a/django/db/models/functions/text.py
+++ b/django/db/models/functions/text.py
@@ -276,7 +276,7 @@ class Right(Left):
def get_substr(self):
return Substr(
- self.source_expressions[0], self.source_expressions[1] *
Value(-1)
+ self.source_expressions[0], self.source_expressions[1] *
Value(-1), self.source_expressions[1],
)
}}}
Would you like to prepare a patch? (a regression test is required.)
--
Ticket URL: <https://code.djangoproject.com/ticket/34606#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.