Skip to content

Commit

Permalink
🐛 Fix attachment did not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleSheep2Code committed Dec 28, 2024
1 parent 3eee975 commit b041ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/internal/services/attachments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b041ce3

Please sign in to comment.