mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 18:59:38 +02:00
Add bullet workaround #2825
This commit is contained in:
parent
a2b6409460
commit
2ee65aa950
1 changed files with 7 additions and 2 deletions
|
@ -12,8 +12,13 @@ class Epp::Domain < Domain
|
||||||
after_validation :validate_contacts
|
after_validation :validate_contacts
|
||||||
def validate_contacts
|
def validate_contacts
|
||||||
ok = true
|
ok = true
|
||||||
ac = admin_domain_contacts.includes(:contact).select { |x| !x.marked_for_destruction? }.map(&:contact)
|
active_admins = admin_domain_contacts.select { |x| !x.marked_for_destruction? }
|
||||||
tc = tech_domain_contacts.includes(:contact).select { |x| !x.marked_for_destruction? }.map(&:contact)
|
active_techs = tech_domain_contacts.select { |x| !x.marked_for_destruction? }
|
||||||
|
|
||||||
|
# bullet workaround
|
||||||
|
ac = active_admins.map { |x| Contact.find(x.contact_id) }
|
||||||
|
tc = active_techs.map { |x| Contact.find(x.contact_id) }
|
||||||
|
|
||||||
# validate registrant here as well
|
# validate registrant here as well
|
||||||
([registrant] + ac + tc).each do |x|
|
([registrant] + ac + tc).each do |x|
|
||||||
unless x.valid?
|
unless x.valid?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue