Check if reviewer is nil

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-05-25 15:57:32 +02:00 committed by Jonas Franz
parent f64f8e0b1d
commit 4ad72dec57
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD
1 changed files with 3 additions and 0 deletions

View File

@ -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,