Exclude nil balloters from vote phase participants

The `user_id` can be `nil` for ballots.
This commit is contained in:
Javi Martín
2019-03-26 20:34:03 +01:00
parent 0a578f2775
commit cf32cc940b
2 changed files with 9 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ class Budget::Stats
end
def balloters
budget.ballots.where("ballot_lines_count > ?", 0).pluck(:user_id)
budget.ballots.where("ballot_lines_count > ?", 0).pluck(:user_id).compact
end
def poll_ballot_voters