mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Add defensive check to AfterUnallowDomainService (#37744)
Co-authored-by: Your Name <you@example.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user