Skip to content

Commit

Permalink
Fix regression with 91be7f2
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Oct 1, 2021
1 parent 089e6e0 commit 05c3b6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/eeg2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_bids_metadata(sid, data):
with open(data['file_path']) as fd:
try:
metadata = json.load(fd)
empty_values = [k for k in metadata if metadata[k].strip() == '']
empty_values = [k for k in metadata if isinstance(metadata[k], str) and metadata[k].strip() == '']
diff = list(set(metadata.keys()) - set(metadata_fields[data['modality']]) - set(empty_values))
ignored_keys = empty_values + diff

Expand Down
5 changes: 4 additions & 1 deletion src/jsx/Configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,10 @@ const Configuration = (props) => {
);
} else {
result.push(
<div key={key}>
<div
key={key}
style={{paddingLeft: '32px'}}
>
{key}: {typeof metadata[key] == 'object' ?
JSON.stringify(metadata[key]) :
metadata[key]
Expand Down

0 comments on commit 05c3b6c

Please sign in to comment.