File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -498,14 +498,15 @@ func (n *Notification) APIURL() string {
498498type NotificationList []* Notification
499499
500500// LoadAttributes load Repo Issue User and Comment if not loaded
501- func (nl NotificationList ) LoadAttributes () (err error ) {
501+ func (nl NotificationList ) LoadAttributes () error {
502+ var err error
502503 for i := 0 ; i < len (nl ); i ++ {
503504 err = nl [i ].LoadAttributes ()
504505 if err != nil && ! IsErrCommentNotExist (err ) {
505- return
506+ return err
506507 }
507508 }
508- return
509+ return nil
509510}
510511
511512func (nl NotificationList ) getPendingRepoIDs () []int64 {
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ func ListRepoNotifications(ctx *context.APIContext) {
121121 return
122122 }
123123 err = nl .LoadAttributes ()
124- if err != nil && ! models . IsErrCommentNotExist ( err ) {
124+ if err != nil {
125125 ctx .InternalServerError (err )
126126 return
127127 }
You can’t perform that action at this time.
0 commit comments