Skip to content

Commit

Permalink
Merge pull request #682 from oesteban/fix/issue681-repr
Browse files Browse the repository at this point in the history
FIX: BIDSLayout -- TypeError: unhashable type: 'dict'
  • Loading branch information
tyarkoni authored Jan 11, 2021
2 parents 7d561c2 + 017673d commit 7d9c27c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bids/layout/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __repr__(self):
(t.value, t.file.entities.get('subject'))
for t in
self.session.query(Tag).filter_by(entity_name='run')
if t.file.entities.get('subject')
if isinstance(t.value, int) and t.file.entities.get('subject')
)
)

Expand Down
5 changes: 5 additions & 0 deletions bids/tests/data/7t_trt/sub-01/ses-1/sub-01_ses-1_scans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"run": {
"Description": "metadata to cause #681"
}
}

0 comments on commit 7d9c27c

Please sign in to comment.