diff --git a/confhub/builder.py b/confhub/builder.py index 0bb2fad..362419f 100644 --- a/confhub/builder.py +++ b/confhub/builder.py @@ -35,7 +35,8 @@ def add_field_to_datafiles(field_name: str, field: ConfigurationField, parent_pa current[part] = {} current = current[part] - current[field_name] = field.get_default_value() + if not isinstance(field.data_type, BlockCore): + current[field_name] = field.get_default_value() def process_block(_block: BlockCore, parent_path: List[str]) -> None: current_path = parent_path + [_block.__block__] diff --git a/confhub/core/fields.py b/confhub/core/fields.py index fb2b7fe..a238b80 100644 --- a/confhub/core/fields.py +++ b/confhub/core/fields.py @@ -1,4 +1,4 @@ -from typing import Type +from typing import Type, Any from confhub.core.types import DataTypeMapping @@ -19,7 +19,7 @@ def get_default_value(self) -> str: def field( - data_type: Type, + data_type: Any, secret: bool = False, filename: str = None ) -> ConfigurationField: