mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Replace contact name with org when name is empty
This commit is contained in:
parent
7f04f2e2fe
commit
e64622b372
1 changed files with 8 additions and 7 deletions
|
@ -148,6 +148,7 @@ namespace :import do
|
|||
next if existing_contact_ids.include?(x.id)
|
||||
count += 1
|
||||
|
||||
name = x.name.try(:strip).presence || x.organization.try(:strip).presence
|
||||
begin
|
||||
contacts << [
|
||||
x.object_registry.name.try(:strip),
|
||||
|
@ -158,7 +159,7 @@ namespace :import do
|
|||
x.ssn.try(:strip),
|
||||
ident_type_map[x.ssntype],
|
||||
x.object.authinfopw.try(:strip),
|
||||
x.name.try(:strip),
|
||||
name,
|
||||
x.organization.try(:strip),
|
||||
x.object_registry.try(:registrar).try(:id),
|
||||
user,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue