mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Import tech contacts too
This commit is contained in:
parent
d5a7704b87
commit
968e383f9e
6 changed files with 25 additions and 6 deletions
|
@ -84,7 +84,7 @@ class Contact < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def to_s
|
||||
name
|
||||
name || '[no name]'
|
||||
end
|
||||
|
||||
def ident_valid_format?
|
||||
|
|
|
@ -73,9 +73,9 @@ class Dnskey < ActiveRecord::Base
|
|||
hex = [domain.name_in_wire_format, flags_hex, protocol_hex, alg_hex, public_key_hex].join
|
||||
bin = self.class.hex_to_bin(hex)
|
||||
|
||||
if Setting.ds_algorithm == 1
|
||||
if ds_digest_type == 1
|
||||
self.ds_digest = Digest::SHA1.hexdigest(bin).upcase
|
||||
elsif Setting.ds_algorithm == 2
|
||||
elsif ds_digest_type == 2
|
||||
self.ds_digest = Digest::SHA256.hexdigest(bin).upcase
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,5 +10,6 @@ module Legacy
|
|||
has_many :object_states, -> { where('valid_to IS NULL') }, foreign_key: :object_id
|
||||
has_many :dnskeys, foreign_key: :keysetid, primary_key: :keyset
|
||||
has_many :domain_contact_maps, foreign_key: :domainid
|
||||
has_many :nsset_contact_maps, foreign_key: :nssetid, primary_key: :nsset
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,6 +2,6 @@ module Legacy
|
|||
class DomainContactMap < Db
|
||||
self.table_name = :domain_contact_map
|
||||
|
||||
belongs_to :contact, foreign_key: :contactid, primary_key: :legacy_id, class_name: '::Contact'
|
||||
# belongs_to :contact, foreign_key: :contactid, primary_key: :legacy_id, class_name: '::Contact'
|
||||
end
|
||||
end
|
||||
|
|
5
app/models/legacy/nsset_contact_map.rb
Normal file
5
app/models/legacy/nsset_contact_map.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
module Legacy
|
||||
class NssetContactMap < Db
|
||||
self.table_name = :nsset_contact_map
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue