add some more protection

This commit is contained in:
Sam 2018-05-14 12:01:57 +10:00
parent bc9e0d46af
commit d6316ac4b9
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ class Report
trends.each do |trend|
ctr =
if trend.click_through == 0
if trend.click_through == 0 || trend.searches == 0
0
else
trend.click_through.to_f / trend.searches.to_f