Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a production issue where an invalid Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 collegeId가 -1일 때 발생하는 서버 오류를 방지하기 위해 유효하지 않은 ID로 학과 목록을 조회하는 API 호출을 건너뛰도록 수정합니다. 변경 사항은 UserInfoActivity와 UserInfoViewModel에 적용되었으며, -1 값을 '선택되지 않음' 상태로 올바르게 처리합니다. 전반적으로 올바른 수정으로 보입니다. 다만, 코드 가독성과 유지보수성 향상을 위해 매직 넘버 -1을 상수로 정의하여 사용하는 것을 제안하는 리뷰 의견을 남겼습니다.
| val initialCollege = userInfo.userCollege.takeUnless { it.collegeId == -1 } | ||
| val initialDepartment = userInfo.userDepartment.takeUnless { it.departmentId == -1 } |
Treat sentinel -1 college/department as unselected to avoid calling /users/lookup/departments with collegeId=-1 (server VALIDATION_ERROR).
7aeb4ab to
67537ca
Compare
Summary
collegeId=-1이 포함된 상태로 API 요청이 발생하여VALIDATION_ERROR예외가 발생함Describe your changes
collegeId또는departmentId의 sentinel 값-1을 미선택 상태로 간주하도록 처리collegeId == -1인 경우GET /users/lookup/departmentsAPI를 호출하지 않도록 수정→ 서버에서
VALIDATION_ERROR발생 방지