Skip to content

Commit 2a0a13f

Browse files
authored
Merge branch 'main' into support-neuroconv-0.6.5
2 parents a924cd1 + 5658817 commit 2a0a13f

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,10 @@ def upload_folder_to_dandi(
13541354
) -> list[Path]:
13551355
from neuroconv.tools.data_transfers import automatic_dandi_upload
13561356

1357-
os.environ["DANDI_API_KEY"] = api_key # Update API Key
1357+
# Set API key env var for both old (< 0.73.2) and new dandi versions
1358+
os.environ["DANDI_API_KEY"] = api_key
1359+
if sandbox:
1360+
os.environ["DANDI_SANDBOX_API_KEY"] = api_key
13581361

13591362
if ignore_cache:
13601363
os.environ["DANDI_CACHE"] = "ignore"
@@ -1384,8 +1387,10 @@ def upload_project_to_dandi(
13841387
from neuroconv.tools.data_transfers import automatic_dandi_upload
13851388

13861389
# CONVERSION_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True) # Ensure base directory exists
1387-
1388-
os.environ["DANDI_API_KEY"] = api_key # Update API Key
1390+
# Set API key env var for both old (< 0.73.2) and new dandi versions
1391+
os.environ["DANDI_API_KEY"] = api_key
1392+
if sandbox:
1393+
os.environ["DANDI_SANDBOX_API_KEY"] = api_key
13891394

13901395
if ignore_cache:
13911396
os.environ["DANDI_CACHE"] = "ignore"

0 commit comments

Comments
 (0)