From 65aa1c4a2e4b96a1548a3131acc2b0eb525e9259 Mon Sep 17 00:00:00 2001 From: jvfe Date: Mon, 28 Oct 2024 15:06:41 -0300 Subject: [PATCH] fix: self.sha must not be none to reset to none --- nf_core/components/update.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nf_core/components/update.py b/nf_core/components/update.py index 799707664..4b61c72aa 100644 --- a/nf_core/components/update.py +++ b/nf_core/components/update.py @@ -104,14 +104,14 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr self.modules_repo = ModulesRepo(remote_url, branch) component = component["name"] - if self.current_remote is None: - self.current_remote = self.modules_repo.remote_url - - if self.original_remote != self.modules_repo.remote_url and self.sha is None: + if self.original_remote != self.modules_repo.remote_url and self.sha is not None: self.current_sha = None else: self.current_sha = self.sha + if self.current_remote is None: + self.current_remote = self.modules_repo.remote_url + self.component = component if updated is None: updated = []