diff options
Diffstat (limited to 'routers/repo/pull_review.go')
-rw-r--r-- | routers/repo/pull_review.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/repo/pull_review.go b/routers/repo/pull_review.go index fa13cacfd3..7ca02ac809 100644 --- a/routers/repo/pull_review.go +++ b/routers/repo/pull_review.go @@ -107,6 +107,13 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) { ctx.ServerError("GetCurrentReview", fmt.Errorf("unknown ReviewType: %s", form.Type)) return } + + if form.HasEmptyContent() { + ctx.Flash.Error(ctx.Tr("repo.issues.review.content.empty")) + ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index)) + return + } + review, err = models.GetCurrentReview(ctx.User, issue) if err != nil { if !models.IsErrReviewNotExist(err) { |