Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: draft run any nodes raise 500 (#28636)

非法操作4a76318877b5
diff --git a/api/controllers/console/app/workflow.py b/api/controllers/console/app/workflow.py
index 7b7a8defa55..00820893650 100644
--- a/api/controllers/console/app/workflow.py
+++ b/api/controllers/console/app/workflow.py
@@ -90,14 +90,20 @@ workflow_pagination_model = console_ns.model("WorkflowPagination", workflow_pagi
# Otherwise register it here
from fields.end_user_fields import simple_end_user_fields
+simple_end_user_model = None
try:
simple_end_user_model = console_ns.models.get("SimpleEndUser")
-except (KeyError, AttributeError):
+except AttributeError:
+ pass
+if simple_end_user_model is None:
simple_end_user_model = console_ns.model("SimpleEndUser", simple_end_user_fields)
+workflow_run_node_execution_model = None
try:
workflow_run_node_execution_model = console_ns.models.get("WorkflowRunNodeExecution")
-except (KeyError, AttributeError):
+except AttributeError:
+ pass
+if workflow_run_node_execution_model is None:
workflow_run_node_execution_model = console_ns.model("WorkflowRunNodeExecution", workflow_run_node_execution_fields)