fix(filter): parse JSON-encoded values in FilterTuple before comma split

This commit is contained in:
Kaushal Shriwas 2026-03-21 15:37:52 +05:30
parent d609b8e2cc
commit f4b9c202d6

View file

@ -1,3 +1,4 @@
import json
import textwrap
from collections import defaultdict
from collections.abc import Generator, Iterable, Mapping, Sequence
@ -110,7 +111,11 @@ class FilterTuple(_FilterTuple):
# soundness
if operator in ("in", "not in") and isinstance(value, str):
value = value.split(",")
try:
parsed = json.loads(value)
value = parsed if isinstance(parsed, list) else [parsed]
except ValueError:
value = value.split(",")
_value: Value
if isinstance(value, _InputValue):