Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions singer/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ def _transform(self, data, typ, schema, path):
return False, None

elif typ == "boolean":
# None and "" must fall through to the null handler; bool(None)
# and bool("") both return False without raising, which would
# silently coerce null values to false for ["null", "boolean"] schemas.
if data is None or data == "":
return False, None

if isinstance(data, str) and data.lower() == "false":
return True, False

Expand Down