aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-05-25 12:38:21 +0800
committerGitHub <noreply@github.com>2022-05-25 07:38:21 +0300
commit336e1ac7797322884137fa565943fb79168d58d1 (patch)
tree78d56dc865675c5bc5ee4b6fc7ec511f4be91784 /routers/web
parentbe99eb26a2f25fbbdf885c26dacd69fdc456e0a9 (diff)
downloadgitea-336e1ac7797322884137fa565943fb79168d58d1.tar.gz
gitea-336e1ac7797322884137fa565943fb79168d58d1.zip
Fix NotificationUnreadCount (#19802)
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/user/notification.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go
index 08cd1b8b31..282cd956ef 100644
--- a/routers/web/user/notification.go
+++ b/routers/web/user/notification.go
@@ -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"
)
@@ -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
}