Skip to content

Commit

Permalink
Removed the use of set when returning search results from channel_gro…
Browse files Browse the repository at this point in the history
…up_search
  • Loading branch information
espenenesNOV committed Mar 21, 2024
1 parent 96a49fc commit 1837a92
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tdm_loader/tdm_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,15 @@ def channel_group_search(self, search_term):
]

ind = []
occurences = {}
for name in found_terms:
for occurence in range(found_terms.count(name)):
i = self.channel_group_index(name, occurence)
ind.append((name, i))
if name not in occurences:
occurences[name] = True
for occurence in range(found_terms.count(name)):
i = self.channel_group_index(name, occurence)
ind.append((name, i))

return set(ind)
return ind

def channel_search(self, search_term):
"""Returns a list of channel names that contain ``search term``.
Expand Down

0 comments on commit 1837a92

Please sign in to comment.