From a8855b818e461c04bb4b30aea21c0681dcab4447 Mon Sep 17 00:00:00 2001 From: Adam <123621952+morington@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:54:08 +0300 Subject: [PATCH] Checkpoint --- confhub/builder.py | 3 ++- confhub/core/fields.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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: