From ddd53737358cdaa3a8335119e9c9700c189dc2fd Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 5 Jul 2026 22:22:33 -0700 Subject: [PATCH] Fix for test_table_default_values Refs https://github.com/simonw/sqlite-utils/pull/764#issuecomment-4889359434 --- sqlite_utils/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index ff2957d..f698b7b 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -710,7 +710,7 @@ class Database: if str(value).upper() in ("CURRENT_TIME", "CURRENT_DATE", "CURRENT_TIMESTAMP"): return value - if str(value).upper() in ("TRUE", "FALSE", "NULL"): + if isinstance(value, str) and value.upper() in ("TRUE", "FALSE", "NULL"): # Keyword literals must stay unquoted; quoting them would turn the # default into a string ('TRUE' instead of 1, 'NULL' instead of null). return value