Import tech contacts too

This commit is contained in:
Martin Lensment 2015-03-17 11:50:45 +02:00 committed by Priit Tark
parent d5a7704b87
commit 968e383f9e
6 changed files with 25 additions and 6 deletions

View file

@ -164,6 +164,8 @@ namespace :import do
start = Time.now.to_f
puts '-----> Importing domains...'
# domain_status_map = {}
domain_columns = [
"name",
"registered_at",
@ -255,7 +257,7 @@ namespace :import do
x.registrant
]
# domain contacts
# admin contacts
x.domain_contact_maps.each do |dc|
domain_contacts << [
'admin', # TODO: Where to get real contact type?
@ -266,6 +268,17 @@ namespace :import do
]
end
# tech contacts
x.nsset_contact_maps.each do |dc|
domain_contacts << [
'tech', # TODO: Where to get real contact type?
user,
user,
x.id,
dc.contactid
]
end
# domain statuses
x.object_states.each do |state|
domain_statuses << [
@ -304,7 +317,7 @@ namespace :import do
key.alg,
key.key,
3, # ds_alg
Setting.ds_algorithm, # ds_digest_type
1, # ds_digest_type /SHA1)
user,
user,
x.id