diff options
Diffstat (limited to 'django/db/models/functions/base.py')
| -rw-r--r-- | django/db/models/functions/base.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/db/models/functions/base.py b/django/db/models/functions/base.py index e9bf01ff0d..905f740a6c 100644 --- a/django/db/models/functions/base.py +++ b/django/db/models/functions/base.py @@ -165,9 +165,8 @@ class Length(Transform): function = 'LENGTH' lookup_name = 'length' - def __init__(self, expression, **extra): - output_field = extra.pop('output_field', fields.IntegerField()) - super().__init__(expression, output_field=output_field, **extra) + def __init__(self, expression, *, output_field=None, **extra): + super().__init__(expression, output_field=output_field or fields.IntegerField(), **extra) def as_mysql(self, compiler, connection): return super().as_sql(compiler, connection, function='CHAR_LENGTH') |
