summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/review.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/review.go b/models/review.go
index 441bb40fbb..e1674e885d 100644
--- a/models/review.go
+++ b/models/review.go
@@ -254,7 +254,7 @@ func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content strin
return nil, nil, err
}
- if len(strings.TrimSpace(content)) == 0 {
+ if reviewType != ReviewTypeApprove && len(strings.TrimSpace(content)) == 0 {
return nil, nil, ContentEmptyErr{}
}
@@ -272,7 +272,7 @@ func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content strin
if err := review.loadCodeComments(sess); err != nil {
return nil, nil, err
}
- if len(review.CodeComments) == 0 && len(strings.TrimSpace(content)) == 0 {
+ if reviewType != ReviewTypeApprove && len(review.CodeComments) == 0 && len(strings.TrimSpace(content)) == 0 {
return nil, nil, ContentEmptyErr{}
}