mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Story#119627029 registrar is not part of contacts
(cherry picked from commit d390045)
This commit is contained in:
parent
2c3c762da3
commit
b8bc341bee
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ class LegalDocument < ActiveRecord::Base
|
|||
end
|
||||
|
||||
contact_ids = DomainVersion.where(item_id: orig_legal.documentable_id).distinct.
|
||||
pluck("object->>'registrar_id'", "object->>'registrant_id'", "object_changes->>'registrar_id'",
|
||||
"object_changes->>'registrant_id'", "children->>'tech_contacts'", "children->>'admin_contacts'").flatten.uniq
|
||||
pluck("object->>'registrant_id'", "object_changes->>'registrant_id'",
|
||||
"children->>'tech_contacts'", "children->>'admin_contacts'").flatten.uniq
|
||||
contact_ids = contact_ids.map{|id| id.is_a?(Hash) ? id["id"] : id}.flatten.compact.uniq
|
||||
LegalDocument.where(documentable_type: "Contact", documentable_id: contact_ids).
|
||||
where(checksum: orig_legal.checksum).where.not(path: orig_legal.path).each do |new_legal|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue