We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46bddd0 commit 57d6757Copy full SHA for 57d6757
1 file changed
app/statistics/router.py
@@ -79,5 +79,9 @@ def get_statistics_by_month(
79
if not stats:
80
raise HTTPException(status_code=404, detail="해당 연도/월 통계가 없습니다.")
81
82
- emotion_ids = [s.emotiontype_id for s in stats if s.emotiontype_id is not None]
+ emotion_ids = []
83
+ for s in stats:
84
+ if s.emotiontype_id is not None:
85
+ emotion_ids.extend([s.emotiontype_id] * s.count)
86
+
87
return summarize_emotions(emotion_ids)
0 commit comments