From 6f76c897e54257eed19fd3d74936133348cca31a Mon Sep 17 00:00:00 2001 From: "Matt Johnson (via Claude)" Date: Wed, 10 Jun 2026 04:26:44 +0000 Subject: [PATCH] fix: add missing _dict_to_dataclass branch for EnvironmentalConfig Without this branch, the environmental config dict falls through to the bare else clause, storing a raw dict instead of an EnvironmentalConfig dataclass. This causes AttributeError when accessing env_cfg.enabled or any nested feed config attributes. Co-Authored-By: Claude Opus 4.6 --- meshai/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshai/config.py b/meshai/config.py index 52c968e..f0201a9 100644 --- a/meshai/config.py +++ b/meshai/config.py @@ -820,6 +820,8 @@ def _dict_to_dataclass(cls, data: dict): kwargs[key] = _dict_to_dataclass(WZDxConfig, value) elif key == "firms" and isinstance(value, dict): kwargs[key] = _dict_to_dataclass(FIRMSConfig, value) + elif key == "environmental" and isinstance(value, dict): + kwargs[key] = _dict_to_dataclass(EnvironmentalConfig, value) elif key == "dashboard" and isinstance(value, dict): kwargs[key] = _dict_to_dataclass(DashboardConfig, value) elif key == "toggles" and isinstance(value, dict):