From 6c3a5b5255b871d56fcd3cb0c48d4d6db45d6e57 Mon Sep 17 00:00:00 2001 From: Pieter Verschaffelt Date: Thu, 29 Feb 2024 12:01:00 +0100 Subject: [PATCH] parse taxon ids as int --- app/controllers/mpa_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/mpa_controller.rb b/app/controllers/mpa_controller.rb index 522e67a..dcd5af8 100644 --- a/app/controllers/mpa_controller.rb +++ b/app/controllers/mpa_controller.rb @@ -22,12 +22,11 @@ def pept2data splitted = line.rstrip.split(";") # Skip taxa that are not found unless splitted[1] == "/" - @response[splitted[0]] = splitted[1] + @response[splitted[0]] = splitted[1].to_i end end taxa = Taxon.includes(:lineage).find(@response.values) - puts taxa.inspect @lineages = Hash.new taxa.each do |taxon|