fix
This commit is contained in:
parent
cbbec6af7d
commit
0c2de23735
@ -42,7 +42,7 @@ class TransferHistory(Base):
|
||||
# 转移失败信息
|
||||
errmsg = Column(String)
|
||||
# 时间
|
||||
date = Column(String, index=True, default=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
||||
date = Column(String, index=True)
|
||||
|
||||
@staticmethod
|
||||
def list_by_title(db: Session, title: str, page: int = 1, count: int = 30):
|
||||
|
@ -1,3 +1,4 @@
|
||||
import time
|
||||
from typing import Any
|
||||
|
||||
from app.db import DbOper
|
||||
@ -24,4 +25,7 @@ class TransferHistoryOper(DbOper):
|
||||
transferhistory = TransferHistory.get_by_hash(self._db, kwargs.get("download_hash"))
|
||||
if transferhistory:
|
||||
transferhistory.delete(self._db, transferhistory.id)
|
||||
kwargs.update({
|
||||
"date": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
||||
})
|
||||
return TransferHistory(**kwargs).create(self._db)
|
||||
|
Loading…
x
Reference in New Issue
Block a user