summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2019-01-13 21:59:26 +0000
committerTim Graham <timograham@gmail.com>2019-01-14 13:02:58 -0500
commit7f1577d1efacea583d06f5786c2f4eee6878643a (patch)
tree837963103e6295dbe3a06fb24bacfcd7285927a2
parentae65eed68d8d252a94117cb53e287594b486dca8 (diff)
Avoided calling as_oracle() for SQLite in Left database function.
-rw-r--r--django/db/models/functions/text.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/models/functions/text.py b/django/db/models/functions/text.py
index 6216cbf6e6..a79c76a8c9 100644
--- a/django/db/models/functions/text.py
+++ b/django/db/models/functions/text.py
@@ -114,11 +114,11 @@ class Left(Func):
def get_substr(self):
return Substr(self.source_expressions[0], Value(1), self.source_expressions[1])
- def use_substr(self, compiler, connection, **extra_context):
+ def as_oracle(self, compiler, connection, **extra_context):
return self.get_substr().as_oracle(compiler, connection, **extra_context)
- as_oracle = use_substr
- as_sqlite = use_substr
+ def as_sqlite(self, compiler, connection, **extra_context):
+ return self.get_substr().as_sqlite(compiler, connection, **extra_context)
class Length(Transform):