diff options
author | Hasan Ramezani <hasan.r67@gmail.com> | 2021-03-28 13:06:29 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-29 06:22:36 +0200 |
commit | ed0cc52dc3b0dfebba8a38c12b6157a007309900 (patch) | |
tree | ce1eea3693fce4e841baedc1382c081fbcce6c83 /tests/expressions | |
parent | dcb06c2c6889d04506b48f025622357e2926c709 (diff) | |
download | django-ed0cc52dc3b0dfebba8a38c12b6157a007309900.tar.gz |
Fixed #32585 -- Fixed Value() crash with DecimalField on SQLite.
Diffstat (limited to 'tests/expressions')
-rw-r--r-- | tests/expressions/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index eb1bfdc2be..9b88c94d7b 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -1757,6 +1757,11 @@ class ValueTests(TestCase): value = Value('foo', output_field=CharField()) self.assertEqual(value.as_sql(compiler, connection), ('%s', ['foo'])) + def test_output_field_decimalfield(self): + Time.objects.create() + time = Time.objects.annotate(one=Value(1, output_field=DecimalField())).first() + self.assertEqual(time.one, 1) + def test_resolve_output_field(self): value_types = [ ('str', CharField), |