Skip to content

Commit

Permalink
Search: Make HGNC "Ontology Term" gene search case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMadBug committed Aug 24, 2021
1 parent fef2868 commit 37ef642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ontology/models/models_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 37ef642

Please sign in to comment.