diff --git a/models/review.go b/models/review.go index c02f7a5ba9..5a4e0be244 100644 --- a/models/review.go +++ b/models/review.go @@ -177,6 +177,9 @@ func CreateReview(opts CreateReviewOptions) (*Review, error) { } func getCurrentReview(e Engine, reviewer *User, issue *Issue) (*Review, error) { + if reviewer == nil { + return nil, nil + } reviews, err := findReviews(e, FindReviewOptions{ Type: ReviewTypePending, IssueID: issue.ID,