mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-24 15:18:46 -05:00
Add defensive check to AfterUnallowDomainService (#37744)
Co-authored-by: Your Name <you@example.com>
This commit is contained in:
parent
d2dca826dd
commit
ecdc7ff3f9
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user