From 484bea4618b0f9880a2ba674de01da7f9b39090b Mon Sep 17 00:00:00 2001 From: jvfe Date: Thu, 24 Oct 2024 08:00:10 -0300 Subject: [PATCH] refact: Re-add isinstance dict --- nf_core/components/update.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nf_core/components/update.py b/nf_core/components/update.py index 2122626cb..b914b5867 100644 --- a/nf_core/components/update.py +++ b/nf_core/components/update.py @@ -99,11 +99,12 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr if isinstance(component, str): component = {"name": component, "git_remote": self.current_remote, "branch": self.branch} - # Override modules_repo when the component to install is a dependency from a subworkflow. - remote_url = component.get("git_remote", self.current_remote) - branch = component.get("branch", self.branch) - self.modules_repo = ModulesRepo(remote_url, branch) - component_name = component["name"] + if isinstance(component, dict): + # Override modules_repo when the component to install is a dependency from a subworkflow. + remote_url = component.get("git_remote", self.current_remote) + branch = component.get("branch", self.branch) + self.modules_repo = ModulesRepo(remote_url, branch) + component_name = component["name"] if self.current_remote == self.modules_repo.remote_url and self.sha is not None: self.current_sha = self.sha