diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index 6fac517af..f0222b2a6 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -12,10 +12,15 @@ class RegistrantUser < User end def domains - Domain.includes(:registrar, :registrant).where(contacts: {ident: ident}) + # TODO: move data to normal columns and drop registrant_ident + ident_cc, ident = @current_user.registrant_ident.split '-' + Domain.includes(:registrar, :registrant).where(contacts: { + ident_type: 'priv', + ident: ident, #identity_code, + ident_country_code: ident_cc #country_code + }) end - def to_s username end