aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authoreladyn <59307989+eladyn@users.noreply.github.com>2022-03-03 16:18:26 +0100
committerGitHub <noreply@github.com>2022-03-03 16:18:26 +0100
commit7a893dab396c24d7e158b190f0a0182ff75bbcfd (patch)
tree2c0434eca1889bce9ac7861dc0f8f47719b2bbe2 /models
parente800bc0cf46579ca24dca51d19f085bd463e8b05 (diff)
downloadgitea-7a893dab396c24d7e158b190f0a0182ff75bbcfd.tar.gz
gitea-7a893dab396c24d7e158b190f0a0182ff75bbcfd.zip
ignore missing comment for user notifications (#18954)
* ignore missing comment for user notifications * instead fix bug in notifications model * use local variable instead Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models')
-rw-r--r--models/notification.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/models/notification.go b/models/notification.go
index 8f5d9d01e6..b53d236e43 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -498,14 +498,15 @@ func (n *Notification) APIURL() string {
type NotificationList []*Notification
// LoadAttributes load Repo Issue User and Comment if not loaded
-func (nl NotificationList) LoadAttributes() (err error) {
+func (nl NotificationList) LoadAttributes() error {
+ var err error
for i := 0; i < len(nl); i++ {
err = nl[i].LoadAttributes()
if err != nil && !IsErrCommentNotExist(err) {
- return
+ return err
}
}
- return
+ return nil
}
func (nl NotificationList) getPendingRepoIDs() []int64 {