Skip to content

Commit

Permalink
skips writting toml section if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfix committed Feb 7, 2023
1 parent 791d7dc commit 7d21ab3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dlt/cli/config_toml_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def write_value(toml_table: TOMLTable, name: str, hint: AnyType, default_value:

if is_base_configuration_inner_hint(hint):
inner_table = tomlkit.table(False)
toml_table[name] = inner_table
write_spec(inner_table, hint())
if len(inner_table) > 0:
toml_table[name] = inner_table
else:

if default_value is None:
Expand Down

0 comments on commit 7d21ab3

Please sign in to comment.