mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-12 16:02:35 +08:00
fix: return last record when get downloadhistory by hash
This commit is contained in:
@@ -53,7 +53,7 @@ class DownloadHistory(Base):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@db_query
|
@db_query
|
||||||
def get_by_hash(db: Session, download_hash: str):
|
def get_by_hash(db: Session, download_hash: str):
|
||||||
return db.query(DownloadHistory).filter(DownloadHistory.download_hash == download_hash).first()
|
return db.query(DownloadHistory).filter(DownloadHistory.download_hash == download_hash).last()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@db_query
|
@db_query
|
||||||
|
|||||||
Reference in New Issue
Block a user