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 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?