Add more load functions to make sure the reference object loaded (#32901)
Fix #32897
This commit is contained in:
parent
5ec8df02f6
commit
dc8f59baa5
2 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,11 @@ func ToAPIPullRequest(ctx context.Context, pr *issues_model.PullRequest, doer *u
|
|||
err error
|
||||
)
|
||||
|
||||
if err = pr.LoadIssue(ctx); err != nil {
|
||||
log.Error("pr.LoadIssue[%d]: %v", pr.ID, err)
|
||||
return nil
|
||||
}
|
||||
|
||||
if err = pr.Issue.LoadRepo(ctx); err != nil {
|
||||
log.Error("pr.Issue.LoadRepo[%d]: %v", pr.ID, err)
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue