mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-29 12:24:32 +02:00
Fix _decode_default_value returning float for negative integer defaults
Python's str.isdigit() returns False for negative numbers like "-5", causing DEFAULT -5 in SQLite to be decoded as -5.0 (float) instead of -5 (int). Switch to re.fullmatch to handle the leading minus sign.
This commit is contained in:
parent
a947dc6739
commit
ad77d36a55
2 changed files with 2 additions and 1 deletions
|
|
@ -309,6 +309,7 @@ def test_table_strict(fresh_db, create_table, expected_strict):
|
|||
"value",
|
||||
(
|
||||
1,
|
||||
-5,
|
||||
1.3,
|
||||
"foo",
|
||||
True,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue