From 2cecb2dc9ef42f7425fd546b525f8ec9f5b55382 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 30 May 2023 10:08:47 -0400 Subject: [PATCH] Increment index which was previously not used in maintenance CLI loop (#25118) --- lib/mastodon/cli/maintenance.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/mastodon/cli/maintenance.rb b/lib/mastodon/cli/maintenance.rb index b10748035..a0d0547a0 100644 --- a/lib/mastodon/cli/maintenance.rb +++ b/lib/mastodon/cli/maintenance.rb @@ -225,9 +225,8 @@ module Mastodon::CLI @prompt.warn "e-mail will be disabled for the following accounts: #{user.map(&:account).map(&:acct).join(', ')}" @prompt.warn 'Please reach out to them and set another address with `tootctl account modify` or delete them.' - i = 0 - users.each do |user| - user.update!(email: "#{i} " + user.email) + users.each_with_index do |user, index| + user.update!(email: "#{index} " + user.email) end end