From 47441f534996530a08daaa03a92cd52965ac95b1 Mon Sep 17 00:00:00 2001 From: tibvdm Date: Mon, 22 Apr 2024 15:26:56 +0200 Subject: [PATCH] filter duplicates --- app/controllers/mpa/pept2filtered_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/mpa/pept2filtered_controller.rb b/app/controllers/mpa/pept2filtered_controller.rb index 70c0849..8aab9ad 100644 --- a/app/controllers/mpa/pept2filtered_controller.rb +++ b/app/controllers/mpa/pept2filtered_controller.rb @@ -20,7 +20,7 @@ def pept2filtered # TODO: we should remove this or use a different approach @response.each do |result| - result["taxa"] = result["taxa"].select { |taxon_id| taxa_filter_ids.include?(taxon_id) } + result["taxa"] = result["taxa"].select { |taxon_id| taxa_filter_ids.include?(taxon_id) }.uniq end end end