From afc68af3a67b2f936429feb3a68c1f09e03ce930 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期五, 11 四月 2025 10:07:24 +0800
Subject: [PATCH] 智能体中心不显示自研智能体

---
 app/api/files.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/app/api/files.py b/app/api/files.py
index 7107025..c6c05c5 100644
--- a/app/api/files.py
+++ b/app/api/files.py
@@ -138,6 +138,8 @@
                     return Response(code=400, msg=str(e))
                 try:
                     file_upload = await dify_service.upload(token, f.filename, file_content, current_user.id)
+                    if not file_upload:
+                        raise HTTPException(status_code=500, detail="涓婁紶鏂囦欢鍑洪敊")
                     try:
                         tokens = await read_file(file_content, f.filename, f.content_type)
                         file_upload["tokens"] = tokens

--
Gitblit v1.8.0