Przeglądaj źródła

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 5 lat temu
committed by GitHub
rodzic
commit
7f4adfaf77
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      app/validators/follow_limit_validator.rb

+ 1
- 1
app/validators/follow_limit_validator.rb Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz