diff options
author | Jeong Arm <kjwonmail@gmail.com> | 2021-10-15 04:11:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 21:11:14 +0200 |
commit | f4081d15647c5fb4e6b4a1020518d4cf44d7a7c0 (patch) | |
tree | 213098c701bcc206edb808b0d10ef5ea3a3e2aea /app/models | |
parent | 3f5f4273b3c2b61d71b64652f75a0d99b7a407bb (diff) |
Allow keeping only 1 boosts/favs on auto deleting posts (#16653)
* Allow keeping 1 boosts/favs on auto deleting posts * Fix tests
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account_statuses_cleanup_policy.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account_statuses_cleanup_policy.rb b/app/models/account_statuses_cleanup_policy.rb index 705ccff54..0a9551ec2 100644 --- a/app/models/account_statuses_cleanup_policy.rb +++ b/app/models/account_statuses_cleanup_policy.rb @@ -164,8 +164,8 @@ class AccountStatusesCleanupPolicy < ApplicationRecord def without_popular_scope scope = Status.left_joins(:status_stat) - scope = scope.where('COALESCE(status_stats.reblogs_count, 0) <= ?', min_reblogs) unless min_reblogs.nil? - scope = scope.where('COALESCE(status_stats.favourites_count, 0) <= ?', min_favs) unless min_favs.nil? + scope = scope.where('COALESCE(status_stats.reblogs_count, 0) < ?', min_reblogs) unless min_reblogs.nil? + scope = scope.where('COALESCE(status_stats.favourites_count, 0) < ?', min_favs) unless min_favs.nil? scope end end |