Skip to content

Commit

Permalink
Merge pull request #748 from bids-standard/fix/get
Browse files Browse the repository at this point in the history
FIX: get unique, with conflicting meta-data
  • Loading branch information
adelavega authored Jul 2, 2021
2 parents ec4b6f8 + 7a7baed commit 8a9a5e5
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 8a9a5e5

Please sign in to comment.