fix 匹配download_hash

This commit is contained in:
thsrite
2023-08-20 21:08:30 +08:00
parent dd76909d45
commit 8b8473b92c
2 changed files with 8 additions and 10 deletions

View File

@ -79,4 +79,8 @@ class TransferHistoryOper(DbOper):
"""
新增转移历史
"""
return TransferHistory(**kwargs).create(self._db)
if kwargs.get("src"):
transferhistory = TransferHistory.get_by_src(self._db, kwargs.get("src"))
if transferhistory:
transferhistory.delete(self._db, transferhistory.id)
return TransferHistory(**kwargs).create(self._db)