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>
This commit is contained in:
		
							parent
							
								
									3561f8fabe
								
							
						
					
					
						commit
						c4e860277d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -245,10 +245,10 @@ module Mastodon
 | 
				
			||||||
      domain configuration.
 | 
					      domain configuration.
 | 
				
			||||||
    LONG_DESC
 | 
					    LONG_DESC
 | 
				
			||||||
    def fix_duplicates
 | 
					    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}")
 | 
					        say("Duplicates found for #{uri}")
 | 
				
			||||||
        begin
 | 
					        begin
 | 
				
			||||||
          ActivityPub::FetchRemotAccountService.new.call(uri) unless options[:dry_run]
 | 
					          ActivityPub::FetchRemoteAccountService.new.call(uri) unless options[:dry_run]
 | 
				
			||||||
        rescue => e
 | 
					        rescue => e
 | 
				
			||||||
          say("Error processing #{uri}: #{e}", :red)
 | 
					          say("Error processing #{uri}: #{e}", :red)
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue