mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Simplified SQLite's Decimal adapter.
This commit is contained in:
parent
65df375c40
commit
b49b59b029
@ -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):
|
||||
|
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user