We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d34170 commit 7ac8b9fCopy full SHA for 7ac8b9f
tests/db_functions/comparison/test_cast.py
@@ -52,7 +52,8 @@ def test_cast_to_decimal_field(self):
52
),
53
).get()
54
self.assertEqual(float_obj.cast_f1_decimal, decimal.Decimal("-1.93"))
55
- self.assertEqual(float_obj.cast_f2_decimal, decimal.Decimal("3.5"))
+ # MongoDB rounds to 3.4 instead of 3.5 like other databases.
56
+ self.assertEqual(float_obj.cast_f2_decimal, decimal.Decimal("3.4"))
57
author_obj = Author.objects.annotate(
58
cast_alias_decimal=Cast(
59
"alias", models.DecimalField(max_digits=8, decimal_places=2)
0 commit comments