From cff515e73c94dd4614ec2dacb280f21424d8d938 Mon Sep 17 00:00:00 2001 From: Marcel Zwiers Date: Thu, 24 Oct 2024 11:05:53 +0200 Subject: [PATCH] Account for empty runitem when saving provenance data (Github issue #241) --- bidscoin/bids.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bidscoin/bids.py b/bidscoin/bids.py index b7d71ea5..05ed7c7d 100644 --- a/bidscoin/bids.py +++ b/bidscoin/bids.py @@ -2695,6 +2695,7 @@ def bidsprov(bidsfolder: Path, source: Path=Path(), runitem: RunItem=None, targe LOGGER.error(f"Could not resolve the BIDS root folder from {bidsfolder}") provfile = bidsfolder/'code'/'bidscoin'/'bidscoiner.tsv' targets = [target.relative_to(bidsfolder) for target in sorted(targets)] + runitem = runitem or RunItem() # Read the provenance data and add the new data to it if provfile.is_file():