diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 6237c3b6f8..7951143fd0 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -40,7 +40,7 @@ Database.register_converter("datetime", decoder(parse_datetime)) Database.register_converter("timestamp", decoder(parse_datetime)) Database.register_converter("TIMESTAMP", decoder(parse_datetime)) -Database.register_adapter(decimal.Decimal, backend_utils.rev_typecast_decimal) +Database.register_adapter(decimal.Decimal, str) class DatabaseWrapper(BaseDatabaseWrapper): diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py index a574d64562..e7b9c30193 100644 --- a/django/db/backends/utils.py +++ b/django/db/backends/utils.py @@ -187,12 +187,6 @@ def typecast_timestamp(s): # does NOT store time zone information # Converters from Python to database (string) # ############################################### -def rev_typecast_decimal(d): - if d is None: - return None - return str(d) - - def split_identifier(identifier): """ Split a SQL identifier into a two element tuple of (namespace, name).