Contact linked test update/refactor #2411

This commit is contained in:
Priit Tark 2015-07-27 15:59:23 +03:00
parent 7fa9fb3c6e
commit a9ba4dbfd2
7 changed files with 16 additions and 10 deletions

View file

@ -528,7 +528,7 @@ class Epp::Domain < Domain
return if registrant.registrar_id == registrar_id
is_other_domains_contact = DomainContact.where('contact_id = ? AND domain_id != ?', registrant_id, id).count > 0
if registrant.domains_owned.count > 1 || is_other_domains_contact
if registrant.registrant_domains.count > 1 || is_other_domains_contact
oc = copy_and_transfer_contact(registrant_id, registrar_id)
self.registrant_id = oc.id
else