From 9c5c9bd7091b60fdccc405890dc4f44a8010e954 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Tue, 8 Oct 2019 09:23:07 -0400 Subject: Stopped adapting DecimalField values to strings on PostgreSQL. The psycopg2 backend uses the type information to provide type hints. --- tests/expressions_case/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/expressions_case/tests.py b/tests/expressions_case/tests.py index efb4ba227e..3778e32f1b 100644 --- a/tests/expressions_case/tests.py +++ b/tests/expressions_case/tests.py @@ -6,9 +6,9 @@ from uuid import UUID from django.core.exceptions import FieldError from django.db.models import ( - BinaryField, BooleanField, Case, CharField, Count, DurationField, F, - GenericIPAddressField, IntegerField, Max, Min, Q, Sum, TextField, - TimeField, UUIDField, Value, When, + BinaryField, BooleanField, Case, CharField, Count, DecimalField, + DurationField, F, GenericIPAddressField, IntegerField, Max, Min, Q, Sum, + TextField, TimeField, UUIDField, Value, When, ) from django.test import SimpleTestCase, TestCase @@ -705,7 +705,7 @@ class CaseExpressionTests(TestCase): CaseTestModel.objects.update( decimal=Case( When(integer=1, then=Decimal('1.1')), - When(integer=2, then=Decimal('2.2')), + When(integer=2, then=Value(Decimal('2.2'), output_field=DecimalField())), ), ) self.assertQuerysetEqual( -- cgit v1.3