diff --git a/lib/modules/material_doc_ids_retriever.rb b/lib/modules/material_doc_ids_retriever.rb index 3e6e991a04..5b2f8e32a0 100644 --- a/lib/modules/material_doc_ids_retriever.rb +++ b/lib/modules/material_doc_ids_retriever.rb @@ -27,7 +27,7 @@ def self.run(params) end anc_ids = [] - anc_ids = ancestors_ids(exact_match.try(:id), params['taxon_name'], exact_match).uniq if ids.include?(exact_match.id) + anc_ids = ancestors_ids(exact_match.try(:id), params['taxon_name'], exact_match).uniq if ids.include?(exact_match.try(:id)) anc_ids | ids elsif params['taxon_concept_id'].present? # retrieve all the ancestors taxa given a taxon(included)