Skip to content

Commit b021115

Browse files
authored
Fix None parsing (#83)
* Fix None parsing * Fix lint
1 parent 2196af5 commit b021115

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "shaped-target-clickhouse"
3-
version = "0.1.20"
3+
version = "0.1.21"
44
description = "`target-clickhouse` is a Singer target for clickhouse, built with the Meltano Singer SDK."
55
readme = "README.md"
66
authors = ["Ben Theunissen"]
@@ -49,6 +49,7 @@ ignore = [
4949
"TCH003",
5050
"ANN202",
5151
"C901",
52+
"TRY201", # Use of bare 'except'
5253
]
5354
select = ["ALL"]
5455
src = ["target_clickhouse"]

target_clickhouse/sinks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ def pre_validate_for_string_type(
199199
if not isinstance(expected_type, list):
200200
expected_type = [expected_type]
201201

202+
if "null" in expected_type and value is None:
203+
continue
204+
202205
if "object" in expected_type and isinstance(value, dict):
203206
pre_validate_for_string_type(
204207
value,

0 commit comments

Comments
 (0)