mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
Stroy#119627029 - in some situations we may have array, so setting to not so deep array
This commit is contained in:
parent
55d111ab52
commit
7ce5b20a6a
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ namespace :legal_doc do
|
|||
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
|
||||
contact_ids = contact_ids.map{|id| id.is_a?(Hash) ? id["id"] : id}.compact.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|
|
||||
unless modified.include?(orig_legal.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue