Commit 7c1f3901 authored by Shai Berger's avatar Shai Berger
Browse files

Fixed #23991 -- Apparently, Oracle doesn't need the decimal field converter

Thanks Josh Smeaton for review.
parent 0fc18825
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -274,8 +274,6 @@ WHEN (new.%(col_name)s IS NULL)
            converters.append(self.convert_binaryfield_value)
        elif internal_type in ['BooleanField', 'NullBooleanField']:
            converters.append(self.convert_booleanfield_value)
        elif internal_type == 'DecimalField':
            converters.append(self.convert_decimalfield_value)
        elif internal_type == 'DateField':
            converters.append(self.convert_datefield_value)
        elif internal_type == 'TimeField':
@@ -311,9 +309,6 @@ WHEN (new.%(col_name)s IS NULL)
            value = bool(value)
        return value

    def convert_decimalfield_value(self, value, field):
        return backend_utils.typecast_decimal(field.format_number(value))

    # cx_Oracle always returns datetime.datetime objects for
    # DATE and TIMESTAMP columns, but Django wants to see a
    # python datetime.date, .time, or .datetime.