Skip to content

Commit

Permalink
Apply uniq to Name.parents
Browse files Browse the repository at this point in the history
Counterintuitively may not return uniq values, in the test fixtures
  • Loading branch information
nimmolo committed Jan 22, 2024
1 parent b25d389 commit 8d8da56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/name/taxonomy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def parents(all: false)
parents.reject!(&:deprecated) unless parents.all?(&:deprecated)

# Return single parent as an array for backwards compatibility.
return parents if all
return parents.uniq if all
return [] unless parents.any?

[parents.first]
Expand Down

0 comments on commit 8d8da56

Please sign in to comment.