FIX: Don't divide by zero if there is no emotion data for TL group (#285)

This commit is contained in:
Roman Rizzi
2023-11-08 13:05:36 -03:00
committed by GitHub
parent b172ef11c4
commit 231cf91cc2
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ module DiscourseAi
y:
tl_emotion_avgs.sum do |tl_emotion_avg|
tl_emotion_avg.public_send("avg_#{e}").to_i
end / tl_emotion_avgs.size,
end / [tl_emotion_avgs.size, 1].max,
}
end,
}