diff options
| -rw-r--r-- | django/db/models/functions/base.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/django/db/models/functions/base.py b/django/db/models/functions/base.py index bb4354ac87..5bcbbb8f06 100644 --- a/django/db/models/functions/base.py +++ b/django/db/models/functions/base.py @@ -222,11 +222,8 @@ class Substr(Func): if not hasattr(pos, 'resolve_expression'): if pos < 1: raise ValueError("'pos' must be greater than 0") - pos = Value(pos) expressions = [expression, pos] if length is not None: - if not hasattr(length, 'resolve_expression'): - length = Value(length) expressions.append(length) super().__init__(*expressions, **extra) |
