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: fix the issue where the comment_id parameter is forcibly converted to a string, causing a 500 error in the PostgreSQL database interface. #1426
shuai7a1c96d2cbf2
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsxindex ec42c562..af2ddbd4 100644--- a/ui/src/components/Comment/index.tsx+++ b/ui/src/components/Comment/index.tsx@@ -53,7 +53,7 @@ import './index.scss';interface IProps {objectId: string;mode?: 'answer' | 'question';- commentId?: string;+ commentId?: string | null;children?: React.ReactNode;}diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsxindex 957a60df..bd0ecbb5 100644--- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx+++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx@@ -169,7 +169,7 @@ const Index: FC<Props> = ({<CommentobjectId={data.id}mode="answer"- commentId={String(searchParams.get('commentId'))}>+ commentId={searchParams.get('commentId')}><Operateqid={data.question_id}aid={data.id}diff --git a/ui/src/pages/Questions/Detail/components/Question/index.tsx b/ui/src/pages/Questions/Detail/components/Question/index.tsxindex 149cd850..f13fa31d 100644--- a/ui/src/pages/Questions/Detail/components/Question/index.tsx+++ b/ui/src/pages/Questions/Detail/components/Question/index.tsx@@ -189,7 +189,7 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {<CommentobjectId={data?.id}mode="question"- commentId={String(searchParams.get('commentId'))}>+ commentId={searchParams.get('commentId')}><Operateqid={data?.id}type="question"