Bladeren bron

Only normalize local polls (#12515)

Before this patch, if remote poll options have leading or trailing spaces,
the information stored locally won't match them, causing federated voting to
fail.
master^2
ThibG 4 jaren geleden
committed by Eugen Rochko
bovenliggende
commit
f60cd97638
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. +1
    -1
      app/models/poll.rb

+ 1
- 1
app/models/poll.rb Bestand weergeven

@@ -36,7 +36,7 @@ class Poll < ApplicationRecord
scope :attached, -> { where.not(status_id: nil) }
scope :unattached, -> { where(status_id: nil) }

before_validation :prepare_options
before_validation :prepare_options, if: :local?
before_validation :prepare_votes_count

after_initialize :prepare_cached_tallies


Laden…
Annuleren
Opslaan