Skip to content

Commit

Permalink
Fix duplication of sub-types in site types legend
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Feb 5, 2022
1 parent fddb536 commit 0210bf8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions website/views/sequence.py
Expand Up @@ -168,8 +168,8 @@ def site_types_hierarchy(include_multi_ptm=True):

available_types.extend(SiteType.available_types())

sub_types = {
sub_type
sub_type_names = {
sub_type.name
for site_type in available_types
for sub_type in site_type.sub_types
}
Expand All @@ -190,7 +190,11 @@ def site_types_hierarchy(include_multi_ptm=True):
without_subtypes = {
site_type.name: []
for site_type in available_types
if site_type.name not in with_subtypes and site_type not in sub_types
if (
site_type.name not in with_subtypes
and
site_type.name not in sub_type_names
)
}

return {
Expand Down

0 comments on commit 0210bf8

Please sign in to comment.