Browse Source

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

* Fix follow limit validator reporting lower number past threshold

* Avoid floating point follow limit
pull/4/head
Eugen Rochko 5 years ago
committed by GitHub
parent
commit
7f4adfaf77
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/validators/follow_limit_validator.rb

+ 1
- 1
app/validators/follow_limit_validator.rb View File

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

Loading…
Cancel
Save