Skip to content

Commit

Permalink
fix: backward compatible truthiness for query from dict parsing (#3124)
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang committed May 8, 2024
1 parent fb9a153 commit b425f9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/phoenix/trace/dsl/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,11 +661,13 @@ def from_dict(
**(
{"_explode": Explosion.from_dict(cast(Mapping[str, Any], explode))} # type: ignore
if (explode := obj.get("explode"))
and explode.get("key") # check `key` for backward-compatible truthiness
else {}
),
**(
{"_concat": Concatenation.from_dict(cast(Mapping[str, Any], concat))} # type: ignore
if (concat := obj.get("concat"))
and concat.get("key") # check `key` for backward-compatible truthiness
else {}
),
**(
Expand Down

0 comments on commit b425f9d

Please sign in to comment.