1
0
Fork 0
forked from gitea/nas

Fix tootctl accounts create failing because of date-of-birth check (#34663)

This commit is contained in:
Claire 2025-05-12 11:28:12 +02:00 committed by GitHub
parent 3357ae9889
commit 4e2aa78a56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 7 deletions

View file

@ -79,7 +79,14 @@ module Mastodon::CLI
account = Account.new(username: username)
password = SecureRandom.hex
user = User.new(email: options[:email], password: password, agreement: true, role_id: role_id, confirmed_at: options[:confirmed] ? Time.now.utc : nil, bypass_invite_request_check: true)
user = User.new(
email: options[:email],
password: password,
agreement: true,
role_id: role_id,
confirmed_at: options[:confirmed] ? Time.now.utc : nil,
bypass_registration_checks: true
)
if options[:reattach]
account = Account.find_local(username) || Account.new(username: username)