Fix ZeroDivisionError (#557)

This commit is contained in:
Josh Brown
2024-03-20 13:14:08 -04:00
committed by GitHub
parent 49d1fe0e11
commit c7b336de45
+2 -1
View File
@@ -40,7 +40,8 @@
end
def percent_of_total
return 100 if parent.nil?
return 100 if parent.nil? || parent.sum.zero?
((sum / parent.sum) * 100).round(1)
end