mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
[BugFix] Fix comment broken issue ref dependence (#12651)
* deleteIssuesByRepoID: delete related CommentTypeRemoveDependency & CommentTypeAddDependency comments too * Ignore ErrIssueNotExist on comment.LoadDepIssueDetails() * Add migration * Ignore 'dependent_issue_id = 0' case * exchange as per @lunny Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
42a5e39b3b
commit
6c5266c9ca
4 changed files with 25 additions and 2 deletions
|
@ -1079,8 +1079,10 @@ func ViewIssue(ctx *context.Context) {
|
|||
}
|
||||
} else if comment.Type == models.CommentTypeRemoveDependency || comment.Type == models.CommentTypeAddDependency {
|
||||
if err = comment.LoadDepIssueDetails(); err != nil {
|
||||
ctx.ServerError("LoadDepIssueDetails", err)
|
||||
return
|
||||
if !models.IsErrIssueNotExist(err) {
|
||||
ctx.ServerError("LoadDepIssueDetails", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
} else if comment.Type == models.CommentTypeCode || comment.Type == models.CommentTypeReview {
|
||||
comment.RenderedContent = string(markdown.Render([]byte(comment.Content), ctx.Repo.RepoLink,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue