Skip to content

Commit

Permalink
Exclude dicts from set
Browse files Browse the repository at this point in the history
  • Loading branch information
adelavega committed Jun 29, 2021
1 parent ec4b6f8 commit 7a7baed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bids/layout/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ def get(self, return_type='object', target=None, scope='all',
results = [x for x in results if target in x.entities]

if return_type == 'id':
results = list(set([x.entities[target] for x in results]))
results = list(set(
[x.entities[target] for x in results
if type(x.entities[target]) is not dict]))
results = natural_sort(results)

elif return_type == 'dir':
Expand Down

0 comments on commit 7a7baed

Please sign in to comment.