File tree 2 files changed +5
-4
lines changed
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 {
498
498
type NotificationList []* Notification
499
499
500
500
// 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
502
503
for i := 0 ; i < len (nl ); i ++ {
503
504
err = nl [i ].LoadAttributes ()
504
505
if err != nil && ! IsErrCommentNotExist (err ) {
505
- return
506
+ return err
506
507
}
507
508
}
508
- return
509
+ return nil
509
510
}
510
511
511
512
func (nl NotificationList ) getPendingRepoIDs () []int64 {
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ func ListRepoNotifications(ctx *context.APIContext) {
121
121
return
122
122
}
123
123
err = nl .LoadAttributes ()
124
- if err != nil && ! models . IsErrCommentNotExist ( err ) {
124
+ if err != nil {
125
125
ctx .InternalServerError (err )
126
126
return
127
127
}
You can’t perform that action at this time.
0 commit comments