From bde33bdd51b58a63d3e50fab687815968383b86d Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 16 Jul 2020 09:43:08 +0200 Subject: [PATCH] Stopped adapting DecimalField values to strings on Oracle. cx_Oracle handles decimal.Decimal. expressions_case.tests.CaseExpressionTests.test_update_decimal fails without this change. Follow up to 9c5c9bd7091b60fdccc405890dc4f44a8010e954. --- django/db/backends/oracle/operations.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py index 9dc28c84cd..e156bf37a4 100644 --- a/django/db/backends/oracle/operations.py +++ b/django/db/backends/oracle/operations.py @@ -570,6 +570,9 @@ END; return Oracle_datetime(1900, 1, 1, value.hour, value.minute, value.second, value.microsecond) + def adapt_decimalfield_value(self, value, max_digits=None, decimal_places=None): + return value + def combine_expression(self, connector, sub_expressions): lhs, rhs = sub_expressions if connector == '%%':