From 7fab2c92c2c281b7261b3d41d51871226af2d7b0 Mon Sep 17 00:00:00 2001 From: James Hayhurst Date: Wed, 25 Sep 2024 09:09:40 +0000 Subject: [PATCH] Don't go to backend if no biosampleId --- app/models/entities/GwasIndex.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/entities/GwasIndex.scala b/app/models/entities/GwasIndex.scala index 8dec835a..85d68c29 100644 --- a/app/models/entities/GwasIndex.scala +++ b/app/models/entities/GwasIndex.scala @@ -81,8 +81,11 @@ object GwasIndex extends Logging { Some("Biosample"), resolve = js => { val biosampleId = (js.value \ "biosampleFromSourceId").asOpt[String].getOrElse("") - logger.info(s"Finding biosample: $biosampleId") - js.ctx.getBiosample(biosampleId) + if (biosampleId.isEmpty) { + None + } else { + js.ctx.getBiosample(biosampleId) + } } ), Field(