From 3ea1777a0994a79d001a46c065b6b5abaa43821e Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 13 Nov 2025 09:19:57 -0800 Subject: [PATCH] fix(dev): Don't crash on exports with GitHub intentionally disabled --- services/datalad/datalad_service/common/github.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/services/datalad/datalad_service/common/github.py b/services/datalad/datalad_service/common/github.py index f90fc54d6..18425eb9e 100644 --- a/services/datalad/datalad_service/common/github.py +++ b/services/datalad/datalad_service/common/github.py @@ -12,14 +12,8 @@ def create_github_repo(dataset_path, dataset_id): """Setup a github sibling / remote.""" try: - # raise exception if github exports are not enabled if not DATALAD_GITHUB_EXPORTS_ENABLED: - raise Exception( - 'DATALAD_GITHUB_EXPORTS_ENABLED must be defined to create remote repos' - ) - - # this adds github remote to config and also creates repo - return create_sibling_github(dataset_path, dataset_id) + return create_sibling_github(dataset_path, dataset_id) except KeyError: raise Exception( 'DATALAD_GITHUB_TOKEN and DATALAD_GITHUB_ORG must be defined to create remote repos'