aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull
diff options
context:
space:
mode:
Diffstat (limited to 'services/pull')
-rw-r--r--services/pull/review.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/pull/review.go b/services/pull/review.go
index 90d07c8358..8900ae2ab1 100644
--- a/services/pull/review.go
+++ b/services/pull/review.go
@@ -268,11 +268,11 @@ func createCodeComment(ctx context.Context, doer *user_model.User, repo *repo_mo
// SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist
func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repository, issue *issues_model.Issue, reviewType issues_model.ReviewType, content, commitID string, attachmentUUIDs []string) (*issues_model.Review, *issues_model.Comment, error) {
- pr, err := issue.GetPullRequest(ctx)
- if err != nil {
+ if err := issue.LoadPullRequest(ctx); err != nil {
return nil, nil, err
}
+ pr := issue.PullRequest
var stale bool
if reviewType != issues_model.ReviewTypeApprove && reviewType != issues_model.ReviewTypeReject {
stale = false