diff --git a/models/attachment.go b/models/attachment.go index b2a2c42ea..e4885d809 100644 --- a/models/attachment.go +++ b/models/attachment.go @@ -220,7 +220,7 @@ func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) { if remove { for i, a := range attachments { - if storage.Attachments.Delete(a.RelativePath()); err != nil { + if err := storage.Attachments.Delete(a.RelativePath()); err != nil { return i, err } }