diff --git a/src/modules/site-v2/templates/_includes/phenotype-search-bar.html b/src/modules/site-v2/templates/_includes/phenotype-search-bar.html index 216942fd..929b7ae7 100644 --- a/src/modules/site-v2/templates/_includes/phenotype-search-bar.html +++ b/src/modules/site-v2/templates/_includes/phenotype-search-bar.html @@ -64,8 +64,7 @@ // Update checked tags via event document.addEventListener("{{table_id}}-update-tag", ({detail}) => { const filterTag = $("#{{ table_id }}-tags-filter input[type=checkbox]").filter(function() { - console.log( $(this).attr('value'), detail.tagVal ); - return $(this).attr('value') === detail.tagVal; + return $(this).attr('value').toLowerCase() === detail.tagVal.toLowerCase(); }) filterTag.prop('checked', true); search(); diff --git a/src/pkg/caendr/caendr/api/phenotype.py b/src/pkg/caendr/caendr/api/phenotype.py index 5059c487..63fad2eb 100644 --- a/src/pkg/caendr/caendr/api/phenotype.py +++ b/src/pkg/caendr/caendr/api/phenotype.py @@ -235,7 +235,7 @@ def get_trait_categories(query = None): tags = filter(None, ( tr.get_tags() for tr in query )) # Flatten the list of lists into a set, and sort the result - tags_list = { tg for tr_tag in tags for tg in tr_tag } + tags_list = { tg.title() for tr_tag in tags for tg in tr_tag } return sorted(tags_list) diff --git a/src/pkg/caendr/caendr/models/sql/phenotype_metadata.py b/src/pkg/caendr/caendr/models/sql/phenotype_metadata.py index de50b175..6d391ba4 100644 --- a/src/pkg/caendr/caendr/models/sql/phenotype_metadata.py +++ b/src/pkg/caendr/caendr/models/sql/phenotype_metadata.py @@ -62,7 +62,7 @@ def get_tags(self): If no tag set defined, returns None. ''' if self.tags: - return { tg.strip() for tg in self.tags.split(',') } + return { tg.strip().lower() for tg in self.tags.split(',') } def add(self, trait_obj):