diff --git a/pkg/internal/services/attachments.go b/pkg/internal/services/attachments.go index fc4ac6e..1739a74 100644 --- a/pkg/internal/services/attachments.go +++ b/pkg/internal/services/attachments.go @@ -190,7 +190,7 @@ func TryLinkAttachment(tx *gorm.DB, og models.Attachment, hash string) (bool, er } func UpdateAttachment(item models.Attachment) (models.Attachment, error) { - if err := database.C.Model(&item).Updates(&item).Error; err != nil { + if err := database.C.Save(&item).Error; err != nil { return item, err } else { CacheAttachment(item)