diff --git a/models/attachment.go b/models/attachment.go index dc2763ba6..c7d058651 100755 --- a/models/attachment.go +++ b/models/attachment.go @@ -585,7 +585,7 @@ func Attachments(opts *AttachmentsOptions) ([]*AttachmentInfo, int64, error) { } else { lowerKeyWord := strings.ToLower(opts.Keyword) - cond = cond.And(builder.Or(builder.Like{"LOWER(attachment.name)", lowerKeyWord})) + cond = cond.And(builder.Or(builder.Like{"LOWER(attachment.name)", lowerKeyWord}, builder.Like{"LOWER(attachment.description)", lowerKeyWord})) count, err = sess.Table(&Attachment{}).Where(cond).Count(new(AttachmentInfo)) }