1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Simplified SQLite converter for bool type.

This commit is contained in:
Sergey Fedoseev 2017-08-10 03:10:34 +05:00 committed by Tim Graham
parent 7104e051c1
commit 5244d7cf54

View File

@ -33,7 +33,7 @@ def decoder(conv_func):
return lambda s: conv_func(s.decode())
Database.register_converter("bool", decoder(lambda s: s == '1'))
Database.register_converter("bool", lambda s: s == b'1')
Database.register_converter("time", decoder(parse_time))
Database.register_converter("date", decoder(parse_date))
Database.register_converter("datetime", decoder(parse_datetime))