Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix "tootctl accounts fix-duplicates" (mastodon#15373)
Browse files Browse the repository at this point in the history
- `pluck_each` cannot be used this way with `group`
- typo

Co-authored-by: Claire <[email protected]>
  • Loading branch information
ClearlyClaire and ClearlyClaire authored Dec 19, 2020
1 parent 3561f8f commit c4e8602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mastodon/accounts_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ def merge(from_acct, to_acct)
domain configuration.
LONG_DESC
def fix_duplicates
Account.remote.select(:uri, 'count(*)').group(:uri).having('count(*) > 1').pluck_each(:uri) do |uri|
Account.remote.select(:uri, 'count(*)').group(:uri).having('count(*) > 1').pluck(:uri).each do |uri|
say("Duplicates found for #{uri}")
begin
ActivityPub::FetchRemotAccountService.new.call(uri) unless options[:dry_run]
ActivityPub::FetchRemoteAccountService.new.call(uri) unless options[:dry_run]
rescue => e
say("Error processing #{uri}: #{e}", :red)
end
Expand Down

0 comments on commit c4e8602

Please sign in to comment.