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