From 5244d7cf5403df2d565e235f5051229973c3033b Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 10 Aug 2017 03:10:34 +0500 Subject: [PATCH] Simplified SQLite converter for bool type. --- django/db/backends/sqlite3/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index e820c6bd2e..cac91df1ba 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -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))