fix: replace hasattr with dictionary key check for flow_data nodes (#5668)
This commit is contained in:
parent
e7a2005188
commit
43d22fdcab
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ from .model import Flow
|
|||
|
||||
def get_webhook_component_in_flow(flow_data: dict):
|
||||
"""Get webhook component in flow data."""
|
||||
if hasattr(flow_data, "nodes"):
|
||||
if "nodes" in flow_data:
|
||||
for node in flow_data.get("nodes", []):
|
||||
if "Webhook" in node.get("id"):
|
||||
return node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue