diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index 420446582..f1e0e1c2d 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -55,7 +55,8 @@ class RegistrantUser < User end def update_related_contacts - contacts = Contact.where(ident: ident, country_code: country_code) + cc, idcode = registrant_ident.split('-') + contacts = Contact.where(ident: idcode, ident_country_code: cc) .where('UPPER(name) != UPPER(?)', username) contacts.each { |c| c.update(name: username) }