mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
_normalize_conditions called its value normalizer as (value, operator) and, on any TypeError, retried it as (value) -- the fallback that let the one-argument list-operator normalizer through. It also swallowed a genuine TypeError raised inside a normalizer, replacing it with an unrelated "missing argument" error, and needed two type: ignores. normalize_filter_condition_value now takes (value, operator="") and ignores the operator (a FilterCondition scalar is never list-wrapped), so both normalizers share Callable[[Any, str], Any]; the walker calls it once, with no try/except and no type: ignore. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>