From e51f0ce89e3a77725b0930e93dedb1d7f540ffd9 Mon Sep 17 00:00:00 2001 From: Kevin Lai <70177777+klai95@users.noreply.github.com> Date: Fri, 26 Aug 2022 15:27:17 -0700 Subject: [PATCH] Backend Error Fix (#642) * fix backend error * debug using print statement * delete print statement --- backend/utils/github.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/utils/github.py b/backend/utils/github.py index 4ce5020db..09754a609 100644 --- a/backend/utils/github.py +++ b/backend/utils/github.py @@ -145,6 +145,9 @@ def get_github_metadata(repo_url: str, branch: str = 'HEAD') -> dict: yaml_file = get_file(repo_url, ".napari/config.yml", branch=branch) if yaml_file: config = yaml.safe_load(yaml_file) + # if the yaml.safe_load method returns None, then assign {} to config + if config is None: + config = {} hub_config = {key: config[key] for key in hub_config_keys if key in config} github_metadata.update(hub_config)