mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-22 05:08:03 +00:00
Fix error when a MX is shared across blocked domains (#17650)
This commit is contained in:
parent
3d60708508
commit
6aef76b5cd
|
@ -38,6 +38,8 @@ module Admin
|
||||||
log_action :create, @email_domain_block
|
log_action :create, @email_domain_block
|
||||||
|
|
||||||
(@email_domain_block.other_domains || []).uniq.each do |domain|
|
(@email_domain_block.other_domains || []).uniq.each do |domain|
|
||||||
|
next if EmailDomainBlock.where(domain: domain).exists?
|
||||||
|
|
||||||
other_email_domain_block = EmailDomainBlock.create!(domain: domain, parent: @email_domain_block)
|
other_email_domain_block = EmailDomainBlock.create!(domain: domain, parent: @email_domain_block)
|
||||||
log_action :create, other_email_domain_block
|
log_action :create, other_email_domain_block
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue