Skip to content

Commit

Permalink
Fix NotificationUnreadCount (#19802)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored May 25, 2022
1 parent be99eb2 commit 336e1ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routers/web/user/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
)

Expand All @@ -35,7 +36,7 @@ func GetNotificationCount(c *context.Context) {
c.Data["NotificationUnreadCount"] = func() int64 {
count, err := models.GetNotificationCount(c.User, models.NotificationStatusUnread)
if err != nil {
c.ServerError("GetNotificationCount", err)
log.Error("Unable to GetNotificationCount for user:%-v: %v", c.User, err)
return -1
}

Expand Down

0 comments on commit 336e1ac

Please sign in to comment.