Skip to content

Commit 19a5529

Browse files
authored
Skip dataclassess fields only when None (#180)
Skip dataclassess fields only when `None` to allow to write empty lists, strings or zeros. Resolves #179
1 parent ea36a97 commit 19a5529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/databricks/labs/blueprint/installation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def _marshal_dataclass(self, type_ref: type, path: list[str], inst: Any) -> tupl
570570
if origin is typing.ClassVar:
571571
continue
572572
raw = getattr(inst, field)
573-
if not raw:
573+
if raw is None:
574574
continue
575575
value, ok = self._marshal(hint, [*path, field], raw)
576576
if not ok:

0 commit comments

Comments
 (0)