Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

版本审核

aichy1263d532533cccf
diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml
index 66fa7e1b..9b02de6f 100644
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@ -95,6 +95,9 @@ backend:
theme:
not_found:
other: "Theme not found."
+ revision:
+ review_underway:
+ other: "Revision review underway."
user:
email_or_password_wrong:
other: *email_or_password_wrong
diff --git a/internal/base/reason/reason.go b/internal/base/reason/reason.go
index 274cc1cc..4d05da4c 100644
--- a/internal/base/reason/reason.go
+++ b/internal/base/reason/reason.go
@@ -55,4 +55,5 @@ const (
UploadFileSourceUnsupported = "error.upload.source_unsupported"
RecommendTagNotExist = "error.tag.recommend_tag_not_found"
RecommendTagEnter = "error.tag.recommend_tag_enter"
+ RevisionReviewUnderway = "error.revision.review_underway"
)
diff --git a/internal/service/question_service.go b/internal/service/question_service.go
index 815af781..c0da1ca1 100644
--- a/internal/service/question_service.go
+++ b/internal/service/question_service.go
@@ -840,5 +840,9 @@ func (qs *QuestionService) CheckCanUpdate(ctx context.Context, req *schema.Check
if err != nil {
return false, err
}
+ if existUnreviewed {
+ err = errors.BadRequest(reason.RevisionReviewUnderway)
+ return existUnreviewed, err
+ }
return existUnreviewed, nil
}