Skip to content

Commit

Permalink
Fix None parsing (#83)
Browse files Browse the repository at this point in the history
* Fix None parsing

* Fix lint
  • Loading branch information
BTheunissen authored Nov 28, 2023
1 parent 2196af5 commit b021115
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "shaped-target-clickhouse"
version = "0.1.20"
version = "0.1.21"
description = "`target-clickhouse` is a Singer target for clickhouse, built with the Meltano Singer SDK."
readme = "README.md"
authors = ["Ben Theunissen"]
Expand Down Expand Up @@ -49,6 +49,7 @@ ignore = [
"TCH003",
"ANN202",
"C901",
"TRY201", # Use of bare 'except'
]
select = ["ALL"]
src = ["target_clickhouse"]
Expand Down
3 changes: 3 additions & 0 deletions target_clickhouse/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ def pre_validate_for_string_type(
if not isinstance(expected_type, list):
expected_type = [expected_type]

if "null" in expected_type and value is None:
continue

if "object" in expected_type and isinstance(value, dict):
pre_validate_for_string_type(
value,
Expand Down

0 comments on commit b021115

Please sign in to comment.