mirror of
https://github.com/django/django.git
synced 2025-08-10 05:48:15 +00:00
This should allow smarter output_field inferring in functions dealing with text expressions. Regression inf333e3513e
. Backport of8b1acc0440
from main
This commit is contained in:
parent
0265eaa500
commit
73869a5163
3 changed files with 19 additions and 1 deletions
|
@ -2227,6 +2227,7 @@ class ValueTests(TestCase):
|
|||
with self.subTest(type=type(value)):
|
||||
expr = Value(value)
|
||||
self.assertIsInstance(expr.output_field, output_field_type)
|
||||
self.assertEqual(Value("foo").output_field.max_length, 3)
|
||||
|
||||
def test_resolve_output_field_failure(self):
|
||||
msg = "Cannot resolve expression type, unknown output_field"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue