diff --git a/repeater/web/api_endpoints.py b/repeater/web/api_endpoints.py index 39a7b30..2bd5887 100644 --- a/repeater/web/api_endpoints.py +++ b/repeater/web/api_endpoints.py @@ -441,7 +441,11 @@ class APIEndpoints: continue try: entry_value = self._normalize_policy_entry_value(kind, entry.get("value")) - except Exception: + except Exception as exc: + logger.warning( + "Skipping invalid policy entry at index %d: %s", ent_idx, exc + ) + continue entry_id = self._slugify_policy_id( diff --git a/tests/test_setup_wizard_pymc.py b/tests/test_setup_wizard_pymc.py index 7bae1bb..c4abd48 100644 --- a/tests/test_setup_wizard_pymc.py +++ b/tests/test_setup_wizard_pymc.py @@ -16,7 +16,6 @@ import yaml from repeater.web.api_endpoints import APIEndpoints - # Minimal initial config.yaml the wizard writes into. _BASE_CONFIG = { "repeater": {"node_name": "mesh-repeater-01", "security": {"admin_password": "admin123"}}, @@ -66,11 +65,11 @@ def wizard_env(tmp_path, monkeypatch): # config has no explicit storage_dir set — that's exactly what we want # so the wizard finds our radio-settings.json next to config.yaml. config = { + "storage_dir": str(tmp_path), "repeater": { - "storage_dir": str(tmp_path), "node_name": "mesh-repeater-01", "security": {"admin_password": "admin123"}, - } + }, } endpoints = APIEndpoints(config=config, config_path=str(config_path))