Fix tootctl accounts approve --number N not aproving N earliest registrations (#24605)

This commit is contained in:
Daniel M Brasil 2023-04-30 01:50:58 -03:00 committed by Claire
parent 660845f781
commit 995ad9602b

View file

@ -513,7 +513,7 @@ module Mastodon
User.pending.find_each(&:approve!)
say('OK', :green)
elsif options[:number]
User.pending.limit(options[:number]).each(&:approve!)
User.pending.order(created_at: :asc).limit(options[:number]).each(&:approve!)
say('OK', :green)
elsif username.present?
account = Account.find_local(username)