Conversation
Summary of ChangesHello @Hrepay, 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! 이 PR은 사용자 학과 정보가 없을 때 발생할 수 있는 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. 학과 없으면 API 호출 멈춰라 데이터 일관 Footnotes
|
| self.currentDepartmentName = departmentName | ||
| self.currentDepartmentId = department.departmentId | ||
| self.currentCollegeId = department.collegeId |
There was a problem hiding this comment.
데이터 일관성을 위해, success 케이스에서도 조회된 학과 정보로 Realm DB를 업데이트하는 것이 좋습니다.
| self.currentDepartmentName = departmentName | |
| self.currentDepartmentId = department.departmentId | |
| self.currentCollegeId = department.collegeId | |
| self.currentDepartmentName = departmentName | |
| self.currentDepartmentId = department.departmentId | |
| self.currentCollegeId = department.collegeId | |
| // 로컬 DB와 동기화 | |
| if let userInfo = UserInfoManager.shared.getCurrentUserInfo() { | |
| UserInfoManager.shared.updateDepartment( | |
| for: userInfo, | |
| collegeId: department.collegeId, | |
| collegeName: department.collegeName, | |
| departmentId: department.departmentId, | |
| departmentName: departmentName | |
| ) | |
| } |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the app would generate a MISSING_USER_DEPARTMENT error when attempting to fetch department-specific partnerships without department information. The fix adds preventive validation and improves data synchronization between server and local Realm storage.
Changes:
- Added pre-API validation in
fetchMyPartnerships()to prevent server calls when department information is missing - Added Realm data synchronization in
fetchDepartmentAndUpdateButton()failure case to maintain consistency between server and local storage
|
|
||
| case .failure(let error): | ||
| print("내 제휴 조회 실패: \(error.localizedDescription)") |
There was a problem hiding this comment.
The early return path clears markers by calling displayMarkers([]), but the failure case at line 89-90 does not clear markers. This creates inconsistent behavior: when department info is missing, markers are cleared, but when the API call fails for other reasons, old markers remain visible. Consider calling self?.displayMarkers([]) in the failure case for consistency, or clarify if the different behavior is intentional.
| print("내 제휴 조회 실패: \(error.localizedDescription)") | |
| print("내 제휴 조회 실패: \(error.localizedDescription)") | |
| self?.displayMarkers([]) |
#️⃣ 관련 이슈
Resolved #386
💡작업 내용
fetchMyPartnerships()에서 학과 정보 없으면 API 호출 차단💬리뷰 요구사항(선택)