diff --git a/taipy/core/config/checkers/_scenario_config_checker.py b/taipy/core/config/checkers/_scenario_config_checker.py index 7adc282baf..1fc4c43e63 100644 --- a/taipy/core/config/checkers/_scenario_config_checker.py +++ b/taipy/core/config/checkers/_scenario_config_checker.py @@ -46,22 +46,24 @@ def _check(self) -> IssueCollector: def _check_if_children_config_id_is_overlapping_with_properties( self, scenario_config_id: str, scenario_config: ScenarioConfig ): - for task in scenario_config.tasks: - if task.id in scenario_config.properties: - self._error( - TaskConfig._ID_KEY, - task.id, - f"The id of the TaskConfig `{task.id}` is overlapping with the " - f"property `{task.id}` of ScenarioConfig `{scenario_config_id}`.", - ) - for data_node in scenario_config.data_nodes: - if data_node.id in scenario_config.properties: - self._error( - DataNodeConfig._ID_KEY, - data_node.id, - f"The id of the DataNodeConfig `{data_node.id}` is overlapping with the " - f"property `{data_node.id}` of ScenarioConfig `{scenario_config_id}`.", - ) + if scenario_config.tasks: + for task in scenario_config.tasks: + if isinstance(task, TaskConfig) and task.id in scenario_config.properties: + self._error( + TaskConfig._ID_KEY, + task.id, + f"The id of the TaskConfig `{task.id}` is overlapping with the " + f"property `{task.id}` of ScenarioConfig `{scenario_config_id}`.", + ) + if scenario_config.data_nodes: + for data_node in scenario_config.data_nodes: + if isinstance(data_node, DataNodeConfig) and data_node.id in scenario_config.properties: + self._error( + DataNodeConfig._ID_KEY, + data_node.id, + f"The id of the DataNodeConfig `{data_node.id}` is overlapping with the " + f"property `{data_node.id}` of ScenarioConfig `{scenario_config_id}`.", + ) def _check_task_configs(self, scenario_config_id: str, scenario_config: ScenarioConfig): self._check_children( diff --git a/taipy/core/config/checkers/_task_config_checker.py b/taipy/core/config/checkers/_task_config_checker.py index c57f2f0931..911f8a7a38 100644 --- a/taipy/core/config/checkers/_task_config_checker.py +++ b/taipy/core/config/checkers/_task_config_checker.py @@ -45,7 +45,7 @@ def _check(self) -> IssueCollector: def _check_if_children_config_id_is_overlapping_with_properties(self, task_config_id: str, task_config: TaskConfig): for data_node in task_config.input_configs + task_config.output_configs: - if data_node.id in task_config.properties: + if isinstance(data_node, DataNodeConfig) and data_node.id in task_config.properties: self._error( DataNodeConfig._ID_KEY, data_node.id,