Skip to content

Commit

Permalink
Fix empty votes arbitrarily increasing voters count in polls (mastodo…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and kadoshita committed May 27, 2022
1 parent 34d7b88 commit 9146563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/services/vote_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class VoteService < BaseService
include Lockable

def call(account, poll, choices)
return if choices.empty?

authorize_with account, poll, :vote?

@account = account
Expand Down

0 comments on commit 9146563

Please sign in to comment.