fix: draft run webhook node the _raw var not display on the panel

This commit is contained in:
hjlarry 2025-10-23 13:35:45 +08:00
parent 37e75f7791
commit 6df786248c
1 changed files with 10 additions and 2 deletions

View File

@ -1056,15 +1056,23 @@ class DraftWorkflowTriggerNodeApi(Resource):
raise e
if not event:
return jsonable_encoder({"status": "waiting", "retry_in": LISTENING_RETRY_IN})
workflow_args = dict(event.workflow_args or {})
raw_files = workflow_args.get("files")
files = _parse_file(draft_workflow, raw_files if isinstance(raw_files, list) else None)
if node_type == NodeType.TRIGGER_WEBHOOK:
user_inputs = workflow_args.get("inputs") or {}
else:
user_inputs = workflow_args
try:
node_execution = workflow_service.run_draft_workflow_node(
app_model=app_model,
draft_workflow=draft_workflow,
node_id=node_id,
user_inputs=event.workflow_args,
user_inputs=user_inputs,
account=current_user,
query="",
files=[],
files=files,
)
return jsonable_encoder(node_execution)
except Exception as e: