Fix contact version generation

This commit is contained in:
Alex Sherman 2021-05-28 16:06:12 +05:00
parent a2f7b7cbe3
commit 8926c70bc3

View file

@ -67,7 +67,7 @@
- else
- contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first
- if contact.nil? && ver = Version::ContactVersion.where(item_id: domain.registrant_id).last
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h&.slice(*Domain&.column_names)))
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}) {|(k,v), o| o[k] = v.last })&.slice(*Contact&.column_names))
= contact.try(:name)
= " ".html_safe
= "(#{t(:deleted)})"