]> source.dussan.org Git - gitea.git/commitdiff
Set PR for issue when load attributes for PRs (#22766)
authorJason Song <i@wolfogre.com>
Sun, 5 Feb 2023 14:24:43 +0000 (22:24 +0800)
committerGitHub <noreply@github.com>
Sun, 5 Feb 2023 14:24:43 +0000 (08:24 -0600)
A missing patch for #22650.

models/issues/pull_list.go

index 68f62ffc4338a00de933dff12a6f800c328cb5f3..f4efd916c8678986cfeff626261da502f40052e1 100644 (file)
@@ -187,6 +187,7 @@ func (prs PullRequestList) loadAttributes(ctx context.Context) error {
                if pr.Issue == nil {
                        return fmt.Errorf("issues and prs may be not in sync: cannot find issue %v for pr %v: %w", pr.IssueID, pr.ID, util.ErrNotExist)
                }
+               pr.Issue.PullRequest = pr
        }
        return nil
 }