Skip to content
Snippets Groups Projects
Unverified Commit c4e86027 authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Fix "tootctl accounts fix-duplicates" (#15373)


- `pluck_each` cannot be used this way with `group`
- typo

Co-authored-by: default avatarClaire <claire.github-309c@sitedethib.com>
parent 3561f8fa
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment