From afd0edf7d1b04433aaf3ac019aa33a6df1932770 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 19 Oct 2024 23:43:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=20=E5=88=A0=E9=99=A4=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=96=87=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/endpoints/history.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/endpoints/history.py b/app/api/endpoints/history.py index 29a399b51..86411b4a4 100644 --- a/app/api/endpoints/history.py +++ b/app/api/endpoints/history.py @@ -90,11 +90,11 @@ def delete_transfer_history(history_in: schemas.TransferHistory, if not state: return schemas.Response(success=False, msg=f"{dest_fileitem.path}删除失败") # 删除源文件 - if deletesrc and history.dest_fileitem: - dest_fileitem = schemas.FileItem(**history.dest_fileitem) - state = StorageChain().delete_file(dest_fileitem) + if deletesrc and history.src_fileitem: + src_fileitem = schemas.FileItem(**history.src_fileitem) + state = StorageChain().delete_file(src_fileitem) if not state: - return schemas.Response(success=False, msg=f"{dest_fileitem.path}删除失败") + return schemas.Response(success=False, msg=f"{src_fileitem.path}删除失败") # 发送事件 eventmanager.send_event( EventType.DownloadFileDeleted,