1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-05 23:34:19 -04:00

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

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,