diff --git a/app/models/form/account_batch.rb b/app/models/form/account_batch.rb index a3d911a0ef0924..5b7d6569e2efc1 100644 --- a/app/models/form/account_batch.rb +++ b/app/models/form/account_batch.rb @@ -98,7 +98,7 @@ def approve_remote! def approve_remote_domain! domains = accounts.group_by(&:domain).pluck(0) - (domains - SpecifiedDomain.where(domain: domains).pluck(:domain)).each do |domain| + (domains - SpecifiedDomain.where(domain: domains, table: 0).pluck(:domain)).each do |domain| SpecifiedDomain.create!(domain: domain, table: 0) end