fix: allow recipes.jsonsplit to pass through NULL values

Table.convert with jsonsplit raised OperationalError on NULL cells
because None.split was called. Match parsedate and return None unchanged.
This commit is contained in:
santhreal 2026-07-17 22:37:44 -07:00
commit 4f4d823f1c
2 changed files with 6 additions and 2 deletions

View file

@ -101,6 +101,7 @@ def test_jsonsplit(fresh_db, delimiter):
[
{"id": 1, "tags": (delimiter or ",").join(["foo", "bar"])},
{"id": 2, "tags": (delimiter or ",").join(["bar", "baz"])},
{"id": 3, "tags": None},
],
pk="id",
)
@ -116,6 +117,7 @@ def test_jsonsplit(fresh_db, delimiter):
assert list(fresh_db["example"].rows) == [
{"id": 1, "tags": '["foo", "bar"]'},
{"id": 2, "tags": '["bar", "baz"]'},
{"id": 3, "tags": None},
]