Add defensive check to AfterUnallowDomainService (#37744)

Co-authored-by: Your Name <you@example.com>
This commit is contained in:
Shlee
2026-02-06 00:43:56 +10:30
committed by GitHub
parent d2dca826dd
commit ecdc7ff3f9

View File

@@ -2,7 +2,9 @@
class AfterUnallowDomainService < BaseService
def call(domain)
Account.where(domain: domain).find_each do |account|
return if domain.blank?
Account.remote.where(domain: domain).find_each do |account|
DeleteAccountService.new.call(account, reserve_username: false)
end
end