mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 02:12:09 +08:00
add some more protection
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user