fixed errror when vars of cnt begin declare with key contain "begin" (#7457)

### What problem does this PR solve?
fixed errror when vars of cnt begin  declare with key contain "begin"

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
so95 2025-05-06 13:39:22 +07:00 committed by GitHub
parent 45dfaf230c
commit d6cc6453d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -466,7 +466,7 @@ class ComponentBase(ABC):
outs = []
for q in sources:
if q.get("component_id"):
if q["component_id"].split("@")[0].lower().find("begin") >= 0:
if "@" in q["component_id"] and q["component_id"].split("@")[0].lower().find("begin") >= 0:
cpn_id, key = q["component_id"].split("@")
for p in self._canvas.get_component(cpn_id)["obj"]._param.query:
if p["key"] == key: