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: can not test custom tool (#15606)

非法操作5019547d33ee
diff --git a/api/models/tools.py b/api/models/tools.py
index b941e4ee0fb..aef14907291 100644
--- a/api/models/tools.py
+++ b/api/models/tools.py
@@ -102,6 +102,8 @@ class ApiToolProvider(Base):
@property
def user(self) -> Account | None:
+ if not self.user_id:
+ return None
return db.session.query(Account).filter(Account.id == self.user_id).first()
@property