aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-02-05 22:24:43 +0800
committerGitHub <noreply@github.com>2023-02-05 08:24:43 -0600
commitd74d16a4b1c79b5b1fc58998aa38bf299cee10ec (patch)
tree6a3e3e5abf631eeb7867e9af38c93ef783ed5af4 /models
parentc18a62279a54f1ba0dc0293dddbe197f527fbf00 (diff)
downloadgitea-d74d16a4b1c79b5b1fc58998aa38bf299cee10ec.tar.gz
gitea-d74d16a4b1c79b5b1fc58998aa38bf299cee10ec.zip
Set PR for issue when load attributes for PRs (#22766)
A missing patch for #22650.
Diffstat (limited to 'models')
-rw-r--r--models/issues/pull_list.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/issues/pull_list.go b/models/issues/pull_list.go
index 68f62ffc43..f4efd916c8 100644
--- a/models/issues/pull_list.go
+++ b/models/issues/pull_list.go
@@ -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
}