Browse Source

fix `switch` bug (#3280)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.14.0
Kevin Hu 11 months ago
parent
commit
f16ef57979
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      agent/component/switch.py

+ 1
- 1
agent/component/switch.py View File

@@ -52,7 +52,7 @@ class Switch(ComponentBase, ABC):
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"])

Loading…
Cancel
Save