mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 05:11:53 +01:00
Fix follow limit validator reporting lower number past threshold (#9230)
* Fix follow limit validator reporting lower number past threshold * Avoid floating point follow limit
This commit is contained in:
parent
6d59dfa15d
commit
7f4adfaf77
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class FollowLimitValidator < ActiveModel::Validator
|
||||||
if account.following_count < LIMIT
|
if account.following_count < LIMIT
|
||||||
LIMIT
|
LIMIT
|
||||||
else
|
else
|
||||||
account.followers_count * RATIO
|
[(account.followers_count * RATIO).round, LIMIT].max
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue