diff options
Diffstat (limited to 'models/notification.go')
-rw-r--r-- | models/notification.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/models/notification.go b/models/notification.go index ce656f4355..48249ae84c 100644 --- a/models/notification.go +++ b/models/notification.go @@ -434,7 +434,13 @@ func (n *Notification) loadComment(e db.Engine) (err error) { if n.Comment == nil && n.CommentID != 0 { n.Comment, err = getCommentByID(e, n.CommentID) if err != nil { - return fmt.Errorf("GetCommentByID [%d] for issue ID [%d]: %v", n.CommentID, n.IssueID, err) + if IsErrCommentNotExist(err) { + return ErrCommentNotExist{ + ID: n.CommentID, + IssueID: n.IssueID, + } + } + return err } } return nil @@ -488,7 +494,7 @@ type NotificationList []*Notification func (nl NotificationList) LoadAttributes() (err error) { for i := 0; i < len(nl); i++ { err = nl[i].LoadAttributes() - if err != nil { + if err != nil && !IsErrCommentNotExist(err) { return } } |