mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Don't force RegistrantUser name to be uppercase
This commit is contained in:
parent
c1bba784d6
commit
7b258f8e79
1 changed files with 4 additions and 2 deletions
|
@ -57,7 +57,9 @@ class RegistrantUser < User
|
|||
|
||||
def update_related_contacts
|
||||
cc, idcode = registrant_ident.split('-')
|
||||
contacts = Contact.where(ident: idcode, country_code: cc).where('name != ?', username)
|
||||
contacts = Contact.where(ident: idcode, country_code: cc)
|
||||
.where('UPPER(name) != UPPER(?)', username)
|
||||
|
||||
contacts.each { |c| c.update(name: username) }
|
||||
end
|
||||
|
||||
|
@ -67,8 +69,8 @@ class RegistrantUser < User
|
|||
return false unless user_data[:first_name]
|
||||
return false unless user_data[:last_name]
|
||||
|
||||
user_data.each_value { |v| v.upcase! if v.is_a?(String) }
|
||||
user_data[:country_code] ||= 'EE'
|
||||
%i[ident country_code].each { |f| user_data[f].upcase! if user_data[f].is_a?(String) }
|
||||
|
||||
find_or_create_by_user_data(user_data)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue