From 94261cc2fb00486e7bb50cdfef6b8b92a403e784 Mon Sep 17 00:00:00 2001 From: Marcel Zwiers Date: Fri, 27 Sep 2024 18:22:08 +0200 Subject: [PATCH] Minor bugfixes --- bidscoin/bidseditor.py | 2 +- tests/test_bids.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bidscoin/bidseditor.py b/bidscoin/bidseditor.py index 12236106..1fedcaec 100755 --- a/bidscoin/bidseditor.py +++ b/bidscoin/bidseditor.py @@ -85,7 +85,7 @@ def __init__(self, bidsfolder: Path, input_bidsmap: BidsMap, template_bidsmap: B self.setWindowIcon(QtGui.QIcon(str(BIDSCOIN_ICON))) self.set_menu_statusbar() - if not input_bidsmap.filepath.is_file(): + if not input_bidsmap.dataformats and not input_bidsmap.filepath.is_file(): filename, _ = QFileDialog.getOpenFileName(self, 'Open a bidsmap file', str(bidsfolder), 'YAML Files (*.yaml *.yml);;All Files (*)') if filename: input_bidsmap = BidsMap(Path(filename)) diff --git a/tests/test_bids.py b/tests/test_bids.py index af4a1c95..a5daf6ef 100644 --- a/tests/test_bids.py +++ b/tests/test_bids.py @@ -293,7 +293,7 @@ def test_init(self, study_bidsmap): # Test loading with a dummy argument bidsmap = BidsMap(Path('dummy')) assert len(bidsmap.dataformats) == 0 - assert bidsmap.filepath.name == '' + assert bidsmap.filepath.name == 'dummy.yaml' def test_check_templates(self):