From 9cdb147f63879e771483f7caeb4782e31098cc3d Mon Sep 17 00:00:00 2001 From: tibvdm Date: Tue, 16 Apr 2024 12:00:14 +0200 Subject: [PATCH] fix equate IL --- app/controllers/private_api/proteins_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/private_api/proteins_controller.rb b/app/controllers/private_api/proteins_controller.rb index bee7315..e81e36e 100644 --- a/app/controllers/private_api/proteins_controller.rb +++ b/app/controllers/private_api/proteins_controller.rb @@ -20,13 +20,13 @@ def proteins end # Request the suffix array search service - search_result = search([ peptide ], equate_il) - if search_result.empty? + search_result = search([ peptide ], equate_il).first + if search_result.nil? return end # Collect all protein information - @proteins = UniprotEntry.where(uniprot_accession_number: search_result[0]["uniprot_accessions"]) + @proteins = UniprotEntry.where(uniprot_accession_number: search_result["uniprot_accessions"]) @lca = search_result["lca"] || -1