Pārlūkot izejas kodu

Fix follow limit validator reporting lower number past threshold (#9230)

* Fix follow limit validator reporting lower number past threshold

* Avoid floating point follow limit
master
Eugen Rochko pirms 5 gadiem
committed by GitHub
vecāks
revīzija
7f4adfaf77
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      app/validators/follow_limit_validator.rb

+ 1
- 1
app/validators/follow_limit_validator.rb Parādīt failu

@@ -14,7 +14,7 @@ class FollowLimitValidator < ActiveModel::Validator
if account.following_count < LIMIT
LIMIT
else
account.followers_count * RATIO
[(account.followers_count * RATIO).round, LIMIT].max
end
end
end


Notiek ielāde…
Atcelt
Saglabāt