diff --git a/bids/layout/layout.py b/bids/layout/layout.py index 44b73c892..c53b1f816 100644 --- a/bids/layout/layout.py +++ b/bids/layout/layout.py @@ -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') ) ) diff --git a/bids/tests/data/7t_trt/sub-01/ses-1/sub-01_ses-1_scans.json b/bids/tests/data/7t_trt/sub-01/ses-1/sub-01_ses-1_scans.json new file mode 100644 index 000000000..7d975db95 --- /dev/null +++ b/bids/tests/data/7t_trt/sub-01/ses-1/sub-01_ses-1_scans.json @@ -0,0 +1,5 @@ +{ + "run": { + "Description": "metadata to cause #681" + } +} \ No newline at end of file