diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-11-08 21:06:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 21:06:01 +0100 |
commit | 7f4adfaf779635035db568095f684a2ded4aea6b (patch) | |
tree | c1d42729ba0e07e155b48183465f03555441fb27 | |
parent | 6d59dfa15d873da75c731b79367ab6b3d1b2f5a5 (diff) |
Fix follow limit validator reporting lower number past threshold (#9230)
* Fix follow limit validator reporting lower number past threshold * Avoid floating point follow limit
-rw-r--r-- | app/validators/follow_limit_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/follow_limit_validator.rb b/app/validators/follow_limit_validator.rb index eb083ed85..409bf0176 100644 --- a/app/validators/follow_limit_validator.rb +++ b/app/validators/follow_limit_validator.rb @@ -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 |