From b40d7e1b29fa9429d2defbf0c8880cd767fedc61 Mon Sep 17 00:00:00 2001 From: Susanna Kiwala Date: Thu, 9 Nov 2023 13:59:21 -0600 Subject: [PATCH 1/2] Fix variable name typo in therapy typeahead --- server/app/graphql/types/queries/typeahead_queries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app/graphql/types/queries/typeahead_queries.rb b/server/app/graphql/types/queries/typeahead_queries.rb index b158da81f..a5e9de7b0 100644 --- a/server/app/graphql/types/queries/typeahead_queries.rb +++ b/server/app/graphql/types/queries/typeahead_queries.rb @@ -94,7 +94,7 @@ def therapy_typeahead(query_term:) return results + secondary_results + tertiary_results else - return results + secondar_results + return results + secondary_results end else return results From 23bb58a0fc695f003bb982f6b003d30a48c6af4c Mon Sep 17 00:00:00 2001 From: Susanna Kiwala Date: Thu, 9 Nov 2023 14:18:46 -0600 Subject: [PATCH 2/2] Allow nil ncit_id values when validation Therapies --- server/app/models/therapy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app/models/therapy.rb b/server/app/models/therapy.rb index 85d196c8c..f9d19a4cb 100644 --- a/server/app/models/therapy.rb +++ b/server/app/models/therapy.rb @@ -8,7 +8,7 @@ class Therapy < ApplicationRecord has_and_belongs_to_many :assertions has_and_belongs_to_many :therapy_aliases - validates :ncit_id, uniqueness: true + validates :ncit_id, uniqueness: true, allow_nil: true def self.url_for(ncit_id:) if ncit_id.nil?