Skip to content

[fix] #286 total_diaries 계산 방식 변경 (오류 해결)#287

Merged
Sihun23 merged 3 commits intodevelopfrom
fix/286
Sep 21, 2025
Merged

[fix] #286 total_diaries 계산 방식 변경 (오류 해결)#287
Sihun23 merged 3 commits intodevelopfrom
fix/286

Conversation

@Sihun23
Copy link
Collaborator

@Sihun23 Sihun23 commented Sep 21, 2025

Related issue 🛠

Work Description ✏️

  • total_diaries음수로 표시되는 사례가 보고됨.
  • 원인(추정 및 재현):
  • 과거 로직이 증감 방식(+1/–1)에 의존 → 실제 캘린더 상태와 분리되어 음수/과증가 가능.
    • 증감 제거 → 사실값 동기화 방식으로 교체
    • UserCalendarWRITTEN 건수를 매번 COUNT하여 UserProfile.totalDiaries재동기화(resync)
    • 작성/삭제 흐름에서 streak 업데이트 후 항상 resync

@Sihun23 Sihun23 requested a review from a team as a code owner September 21, 2025 12:47
@Sihun23 Sihun23 self-assigned this Sep 21, 2025
@Sihun23 Sihun23 added 🔧FIX🔧 Something isn't working 🐬시훈🐬 labels Sep 21, 2025
@Sihun23 Sihun23 merged commit b0fe8cd into develop Sep 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐬시훈🐬 🔧FIX🔧 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] total_diaries 오류 해결

1 participant

Comments