refactor: use EnumText for model_type and WorkflowNodeExecution.status (#34093)

Co-authored-by: Krishna Chaitanya <krishnabkc15@gmail.com>
This commit is contained in:
tmimmanuel
2026-03-26 20:34:44 +00:00
committed by GitHub
co-authored by Krishna Chaitanya
parent 1f11300175
commit 2ea85d3ba2
4 changed files with 14 additions and 7 deletions
@@ -60,7 +60,7 @@ def _dict_to_workflow_node_execution_model(data: dict[str, Any]) -> WorkflowNode
model.triggered_from = WorkflowNodeExecutionTriggeredFrom.WORKFLOW_RUN
model.node_id = data.get("node_id") or ""
model.node_type = data.get("node_type") or ""
model.status = data.get("status") or "running" # Default status if missing
model.status = WorkflowNodeExecutionStatus(data.get("status") or "running")
model.title = data.get("title") or ""
created_by_role_val = data.get("created_by_role")
try: