fix 部分数据库操作没有Commit

This commit is contained in:
jxxghp
2023-09-05 16:12:43 +08:00
parent c3a0a839c3
commit 99218515ea
4 changed files with 9 additions and 6 deletions

View File

@ -130,9 +130,10 @@ class DownloadFiles(Base):
@staticmethod
def delete_by_fullpath(db: Session, fullpath: str):
return db.query(DownloadFiles).filter(DownloadFiles.fullpath == fullpath,
DownloadFiles.state == 1).update(
db.query(DownloadFiles).filter(DownloadFiles.fullpath == fullpath,
DownloadFiles.state == 1).update(
{
"state": 0
}
)
db.commit()