aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/notify/repo.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-10 13:48:45 +0800
committerGitHub <noreply@github.com>2021-11-10 13:48:45 +0800
commit43bbc5478370cbfe3ab1eed730ea002ccec74708 (patch)
treea61e1a93843b727c40ef49b68ec75898a72e78e4 /routers/api/v1/notify/repo.go
parent33fca2b537d36cf998dd27425b2bb8ed5b0965f3 (diff)
downloadgitea-43bbc5478370cbfe3ab1eed730ea002ccec74708.tar.gz
gitea-43bbc5478370cbfe3ab1eed730ea002ccec74708.zip
Fix 500 when a comment was deleted which has a notification (#17550)
* Fix 500 when a comment was deleted which has a notification * Tolerate missing Comment in other places too Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/api/v1/notify/repo.go')
-rw-r--r--routers/api/v1/notify/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/notify/repo.go b/routers/api/v1/notify/repo.go
index 382d221b85..83d0fa5555 100644
--- a/routers/api/v1/notify/repo.go
+++ b/routers/api/v1/notify/repo.go
@@ -121,7 +121,7 @@ func ListRepoNotifications(ctx *context.APIContext) {
return
}
err = nl.LoadAttributes()
- if err != nil {
+ if err != nil && !models.IsErrCommentNotExist(err) {
ctx.InternalServerError(err)
return
}