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.

Use DeShortID on questionID for UpdateQuestionLink() (#1288)

Dāvis4679589655b5
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index b333532d..6c4c932a 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-blank_issues_enabled: false
+blank_issues_enabled: true
contact_links:
- name: Questions & Discussions
url: https://meta.answer.dev
diff --git a/internal/service/question_common/question.go b/internal/service/question_common/question.go
index 5e5f9dbe..9feca222 100644
--- a/internal/service/question_common/question.go
+++ b/internal/service/question_common/question.go
@@ -709,7 +709,7 @@ func (qs *QuestionCommon) UpdateQuestionLink(ctx context.Context, questionID, an
return parsedText, err
}
// Update the number of question links that have been removed
- linkedQuestionIDs, err := qs.questionRepo.GetLinkedQuestionIDs(ctx, questionID, entity.QuestionLinkStatusDeleted)
+ linkedQuestionIDs, err := qs.questionRepo.GetLinkedQuestionIDs(ctx, uid.DeShortID(questionID), entity.QuestionLinkStatusDeleted)
if err != nil {
log.Errorf("get linked question ids error %v", err)
} else {