dify知识库同步/删除问题修复
This commit is contained in:
1 parent
4ff07f8f9b
commit
c14046f9f3
8 files changed
+89
-44
No files matched your search
@@ -1036,10 +1036,11 @@ def delete_document(document_id: int):
|
||||
if not document or document.is_deleted:
|
||||
return jsonify({'error': 'Knowledge base document not found'}), 404
|
||||
|
||||
delete_result = None
|
||||
try:
|
||||
delete_result = delete_document_from_dify(document.id)
|
||||
except Exception as exc:
|
||||
return jsonify({'error': f'删除 Dify 远端文档失败:{exc}'}), 400
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
document.is_deleted = True
|
||||
document.updated_by_id = getattr(current_user, 'id', None)
|
||||
|
||||
Reference in new issue
Block a user