diff --git a/app/models/poll/stats.rb b/app/models/poll/stats.rb index 1eef537a0..1df281434 100644 --- a/app/models/poll/stats.rb +++ b/app/models/poll/stats.rb @@ -26,7 +26,7 @@ class Poll end def total_participants_web_percentage - total_participants_web * 100 / total_participants + (total_participants) == 0 ? 0 : total_participants_web * 100 / total_participants end def total_participants_booth diff --git a/app/views/polls/_results_subnavigation.html.erb b/app/views/polls/_results_subnavigation.html.erb index afff4de03..43aa95b40 100644 --- a/app/views/polls/_results_subnavigation.html.erb +++ b/app/views/polls/_results_subnavigation.html.erb @@ -1,14 +1,14 @@