Skip to content

Commit 7c7eb9e

Browse files
committed
Ignore ErrIssueNotExist on comment.LoadDepIssueDetails()
1 parent 64399ae commit 7c7eb9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

routers/repo/issue.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,10 @@ func ViewIssue(ctx *context.Context) {
10791079
}
10801080
} else if comment.Type == models.CommentTypeRemoveDependency || comment.Type == models.CommentTypeAddDependency {
10811081
if err = comment.LoadDepIssueDetails(); err != nil {
1082-
ctx.ServerError("LoadDepIssueDetails", err)
1083-
return
1082+
if !models.IsErrIssueNotExist(err) {
1083+
ctx.ServerError("LoadDepIssueDetails", err)
1084+
return
1085+
}
10841086
}
10851087
} else if comment.Type == models.CommentTypeCode || comment.Type == models.CommentTypeReview {
10861088
comment.RenderedContent = string(markdown.Render([]byte(comment.Content), ctx.Repo.RepoLink,

0 commit comments

Comments
 (0)