Fix: handle empty string for parent_id and comment_id in form submissions #644
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
변경 사항
게시글 작성과 댓글 작성/수정 시,
parent_id및comment_id가 빈 문자열("")로 전달될 경우 FastAPI가 이를 정수로 파싱하지 못해 422 에러가 발생하는 문제를 수정했습니다.주요 수정 내용
parent_id,comment_id에 대해Union[int, str, None]타입을 사용하도록 변경""입력 시None으로 안전하게 파싱하는 로직 추가관련 이슈
없음
기타 정보
/write_update/{bo_table}) 및 댓글 등록/수정(/write_comment_update/{bo_table}) 양쪽 모두 동일한 방식으로 적용PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요. PR을 보내기 전에 모든 항목을 확인해야 합니다.