about summary refs log tree commit diff
path: root/lib/mastodon/accounts_cli.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-19 13:34:16 +0100
committerGitHub <noreply@github.com>2020-12-19 13:34:16 +0100
commitc4e860277dbc391a0c6ec0311f66a8484cca862b (patch)
treecd9a11ad55cdcc669f91623f16885146ed5984d2 /lib/mastodon/accounts_cli.rb
parent3561f8fabed2a6c40130cb5f1d1d732393dc0200 (diff)
Fix "tootctl accounts fix-duplicates" (#15373)
- `pluck_each` cannot be used this way with `group`
- typo

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'lib/mastodon/accounts_cli.rb')
-rw-r--r--lib/mastodon/accounts_cli.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index 474643869..5275f04cf 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -245,10 +245,10 @@ module Mastodon
       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