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.

update question

aichy126629a917f4d2d
diff --git a/internal/service/question_common/question.go b/internal/service/question_common/question.go
index 8e33c43e..f8c40cf5 100644
--- a/internal/service/question_common/question.go
+++ b/internal/service/question_common/question.go
@@ -414,6 +414,11 @@ func (qs *QuestionCommon) RemoveQuestion(ctx context.Context, req *schema.Remove
if !has {
return nil
}
+
+ if questionInfo.Status == entity.QuestionStatusDeleted {
+ return nil
+ }
+
questionInfo.Status = entity.QuestionStatusDeleted
err = qs.questionRepo.UpdateQuestionStatus(ctx, questionInfo)
if err != nil {