From 71ec102b01fcc85acae3819426a4e02ef423b0fa Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 26 Feb 2021 07:52:16 +0100 Subject: Fixed #32483 -- Fixed QuerySet.values()/values_list() on JSONField key transforms with booleans on SQLite. Thanks Matthew Cornell for the report. --- django/db/backends/sqlite3/operations.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/db/backends/sqlite3/operations.py') diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index faf96a1b97..c578979777 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -21,6 +21,9 @@ class DatabaseOperations(BaseDatabaseOperations): 'DateTimeField': 'TEXT', } explain_prefix = 'EXPLAIN QUERY PLAN' + # List of datatypes to that cannot be extracted with JSON_EXTRACT() on + # SQLite. Use JSON_TYPE() instead. + jsonfield_datatype_values = frozenset(['null', 'false', 'true']) def bulk_batch_size(self, fields, objs): """ -- cgit v1.3