Display the same results for stats and recounts
In the recounts we were incorrectly assuming the total amount included the blank and invalid ballots.
This commit is contained in:
@@ -93,6 +93,10 @@ class Poll::Stats
|
||||
super + total_unregistered_booth
|
||||
end
|
||||
|
||||
def total_registered_booth
|
||||
voters.where(origin: "booth").count
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def participant_ids
|
||||
@@ -107,10 +111,6 @@ class Poll::Stats
|
||||
@recounts ||= poll.recounts
|
||||
end
|
||||
|
||||
def total_registered_booth
|
||||
voters.where(origin: "booth").count
|
||||
end
|
||||
|
||||
def total_unregistered_booth
|
||||
[total_participants_booth - total_registered_booth, 0].max
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user