mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Story#108521790 - update that code works with nameservers
This commit is contained in:
parent
f6d16f51e9
commit
01a82a2960
3 changed files with 31 additions and 22 deletions
|
@ -108,7 +108,6 @@ namespace :import do
|
|||
new_attrs[:id] = domain.id
|
||||
new_attrs[:updated_at] = time
|
||||
p time
|
||||
p responder.import_nameservers_history(domain, time) if responder.respond_to?(:import_nameservers_history)
|
||||
|
||||
event = :update
|
||||
event = :create if i == 0
|
||||
|
@ -121,22 +120,22 @@ namespace :import do
|
|||
if (old_val = last_changes.to_h[k]) != v then changes[k] = [old_val, v] end
|
||||
end
|
||||
next if changes.blank? && event != :destroy
|
||||
obj_his = Legacy::ObjectHistory.find_by(historyid: responder.historyid)
|
||||
responder.import_nameservers_history(domain, time) if responder.respond_to?(:import_nameservers_history)
|
||||
|
||||
p DomainVersion.new(
|
||||
DomainVersion.create!(
|
||||
item_type: domain.class,
|
||||
item_id: domain.id,
|
||||
event: event,
|
||||
whodunnit: responder.user.try(:id),
|
||||
whodunnit: responder.history_domain.user.try(:id),
|
||||
object: last_changes,
|
||||
object_changes: changes,
|
||||
created_at: time,
|
||||
children: {
|
||||
admin_contacts: responder.get_admin_contact_new_ids,
|
||||
tech_contacts: responder.get_tech_contact_new_ids,
|
||||
admin_contacts: responder.history_domain.get_admin_contact_new_ids,
|
||||
tech_contacts: responder.history_domain.get_tech_contact_new_ids,
|
||||
nameservers: [],
|
||||
dnskeys: [],
|
||||
registrant: [responder.new_registrant_id]
|
||||
registrant: [responder.history_domain.new_registrant_id]
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue