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 single-right-quote committed May 27, 2022
1 parent c5456c3 commit a8ac7da
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 a8ac7da

Please sign in to comment.