mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
109119896-name_org_exception
This commit is contained in:
parent
2102d3f189
commit
eddf3234fb
1 changed files with 7 additions and 2 deletions
|
@ -250,7 +250,12 @@ namespace :import do
|
||||||
next if existing_contact_ids.include?(x.id)
|
next if existing_contact_ids.include?(x.id)
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
|
if 4 == x.ssntype
|
||||||
|
name = x.organization.try(:strip).presence || x.name.try(:strip).presence
|
||||||
|
else
|
||||||
name = x.name.try(:strip).presence || x.organization.try(:strip).presence
|
name = x.name.try(:strip).presence || x.organization.try(:strip).presence
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
contacts << [
|
contacts << [
|
||||||
x.object_registry.name.try(:strip),
|
x.object_registry.name.try(:strip),
|
||||||
|
@ -262,7 +267,7 @@ namespace :import do
|
||||||
x.ssn.try(:strip),
|
x.ssn.try(:strip),
|
||||||
ident_type_map[x.ssntype],
|
ident_type_map[x.ssntype],
|
||||||
x.object.authinfopw.try(:strip),
|
x.object.authinfopw.try(:strip),
|
||||||
x.organization.try(:strip)? x.organization.try(:strip): name,
|
name,
|
||||||
Registrar.find_by(legacy_id: x.object.try(:clid)).try(:id),
|
Registrar.find_by(legacy_id: x.object.try(:clid)).try(:id),
|
||||||
x.object_registry.try(:registrar).try(:name),
|
x.object_registry.try(:registrar).try(:name),
|
||||||
x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
|
x.object.try(:registrar).try(:name) ? x.object.try(:registrar).try(:name) : x.object_registry.try(:registrar).try(:name),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue