1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #33406 -- Avoided creation of MaxLengthValidator(None) when resolving Value.output_field for strings.

This brings the behaviour in line with Field subclasses which append to
the validators within __init__(), like BinaryField, and prevents the
creation of a validator which incorrectly throws a TypeError, if it
were used.
This commit is contained in:
Keryn Knight
2022-01-03 11:29:24 +00:00
committed by Mariusz Felisiak
parent b894199eb0
commit 0ed2919814
2 changed files with 3 additions and 1 deletions

View File

@@ -1859,6 +1859,7 @@ class ValueTests(TestCase):
and this demonstrates that they don't throw an exception.
"""
value_types = [
'str',
True,
42,
3.14,