From 37ef642afe593cc5a815a547dc1150b32e8112f7 Mon Sep 17 00:00:00 2001 From: TheMadBug Date: Tue, 24 Aug 2021 16:46:03 +1000 Subject: [PATCH] Search: Make HGNC "Ontology Term" gene search case insensitive --- ontology/models/models_ontology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontology/models/models_ontology.py b/ontology/models/models_ontology.py index a4a92de4d..fde97b6ff 100644 --- a/ontology/models/models_ontology.py +++ b/ontology/models/models_ontology.py @@ -294,7 +294,7 @@ def get_or_stub(id_str: str) -> 'OntologyTerm': name="" ) except ValueError: - if existing := OntologyTerm.objects.filter(ontology_service=prefix, name=postfix).first(): + if existing := OntologyTerm.objects.filter(ontology_service=prefix, name__iexact=postfix).first(): return existing raise ValueError(f"Can not convert {id_str} to a proper id")