Skip to content

Commit

Permalink
fix pytest by checking if modules_json exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed May 6, 2024
1 parent f69fe30 commit 65f7647
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nf_core/modules/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def lint_module(self, mod, progress_bar, registry, local=False, fix_version=Fals

# Otherwise run all the lint tests
else:
if self.repo_type == "pipeline":
if self.repo_type == "pipeline" and self.modules_json:
# Set correct sha
version = self.modules_json.get_module_version(mod.component_name, mod.repo_url, mod.org)
mod.git_sha = version
Expand Down
2 changes: 1 addition & 1 deletion nf_core/subworkflows/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def lint_subworkflow(self, swf, progress_bar, registry, local=False):

# Otherwise run all the lint tests
else:
if self.repo_type == "pipeline":
if self.repo_type == "pipeline" and self.modules_json:
# Set correct sha
version = self.modules_json.get_subworkflow_version(swf.component_name, swf.repo_url, swf.org)
swf.git_sha = version
Expand Down

0 comments on commit 65f7647

Please sign in to comment.