From 889e59e15f2d77377ebfd7912ee5205bd853a403 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 27 Aug 2024 08:41:53 +0200 Subject: [PATCH] handle missing self.default_branch --- nf_core/pipelines/create/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 71265a7e2..2a227329f 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -431,7 +431,7 @@ def get_default_branch(self) -> None: ) # default to main except configparser.Error: log.debug("Could not read init.defaultBranch") - if self.default_branch in ["dev", "TEMPLATE"]: + if self.default_branch is not None and self.default_branch in ["dev", "TEMPLATE"]: raise UserWarning( f"Your Git defaultBranch '{self.default_branch}' is incompatible with nf-core.\n" "'dev' and 'TEMPLATE' can not be used as default branch name.\n"