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.
fix
aichy126345398a6de9a
diff --git a/internal/repo/answer/answer_repo.go b/internal/repo/answer/answer_repo.goindex 77b76779..5961a270 100644--- a/internal/repo/answer/answer_repo.go+++ b/internal/repo/answer/answer_repo.go@@ -199,7 +199,7 @@ func (ar *answerRepo) GetByID(ctx context.Context, id string) (*entity.Answer, bfunc (ar *answerRepo) GetByUserIDQuestionID(ctx context.Context, userID string, questionID string) (*entity.Answer, bool, error) {questionID = uid.DeShortID(questionID)var resp entity.Answer- has, err := ar.data.DB.Context(ctx).Where("question_id =? and user_id = ?", questionID, userID).Get(&resp)+ has, err := ar.data.DB.Context(ctx).Where("question_id =? and user_id = ? and status = ?", questionID, userID, entity.AnswerStatusAvailable).Get(&resp)if err != nil {return &resp, false, errors.InternalServer(reason.DatabaseError).WithError(err).WithStack()}