♻️ Use update api instead of overhaul in background tasks

This commit is contained in:
2025-01-01 11:43:54 +08:00
parent 2bd8dc17d1
commit 5e73d9acd4
3 changed files with 12 additions and 18 deletions

View File

@@ -48,7 +48,7 @@ func ReUploadFile(meta models.Attachment, dst int, doNotUpdate ...bool) error {
cleanupDst := func() {
if len(doNotUpdate) == 0 || !doNotUpdate[0] {
database.C.Save(&meta)
database.C.Model(&meta).Update("destination", dst)
}
if prevDst == models.AttachmentDstTemporary {
return