Skip to content

Commit

Permalink
fix switch bug (infiniflow#3280)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored and jhaiq committed Nov 30, 2024
1 parent d7d3d60 commit be3724f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/component/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _run(self, history, **kwargs):
res = []
for item in cond["items"]:
out = self._canvas.get_component(item["cpn_id"])["obj"].output()[1]
cpn_input = "" if "content" not in out.columns else " ".join(out["content"])
cpn_input = "" if "content" not in out.columns else " ".join([str(s) for s in out["content"]])
res.append(self.process_operator(cpn_input, item["operator"], item["value"]))
if cond["logical_operator"] != "and" and any(res):
return Switch.be_output(cond["to"])
Expand Down

0 comments on commit be3724f

Please sign in to comment.