Skip to content

Commit

Permalink
SpeciesFileGroup#4145 Ignore intermediate otus/links in key exchange …
Browse files Browse the repository at this point in the history
…format
  • Loading branch information
kleintom committed Dec 17, 2024
1 parent 513d2ae commit 4dbdd73
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/helpers/leads_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ def key_data(lead, metadata)
position: l.position,
}

if l.otu
if metadata.dig(l.id, :children)&.any?
d.merge!(
target_label: metadata.dig(l.id, :couplet_number),
target_type: :internal,
)
elsif l.otu
d.merge!(
target_label: ( l.otu ? label_for_otu(l.otu) : nil ),
target_id: l.otu&.id,
Expand All @@ -170,11 +175,6 @@ def key_data(lead, metadata)
target_type: :link_out,
target_link: l.link_out
)
else
d.merge!(
target_label: metadata.dig(l.id, :couplet_number),
target_type: :internal,
)
end

if l.depictions.load.any?
Expand Down

0 comments on commit 4dbdd73

Please sign in to comment.