diff --git a/services/extractor/schemas.py b/services/extractor/schemas.py index 8319842..02199df 100644 --- a/services/extractor/schemas.py +++ b/services/extractor/schemas.py @@ -268,9 +268,9 @@ def _normalize_extraction_data(data: dict[str, Any]) -> dict[str, Any]: # Map impact_horizon alternatives horizon = comp.get("impact_horizon", "") if isinstance(horizon, str): - mapped = _HORIZON_MAP.get(horizon.lower().strip()) - if mapped: - comp["impact_horizon"] = mapped + h = horizon.lower().strip() + if h not in VALID_IMPACT_HORIZONS: + comp["impact_horizon"] = _HORIZON_MAP.get(h, "1d_30d") # Map catalyst_type alternatives cat = comp.get("catalyst_type", "") if isinstance(cat, str) and cat.lower().strip() not in _VALID_CATALYSTS: