From e372d103b9cdfa8e891e7085ead4d0c5c5eaaa06 Mon Sep 17 00:00:00 2001 From: ig596 Date: Sat, 18 Mar 2023 11:13:03 -0400 Subject: [PATCH] Updated Get in manager to fix None vs 0 issue on totalDependencies for code projects --- snyk/managers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snyk/managers.py b/snyk/managers.py index 651f056..8ffa730 100644 --- a/snyk/managers.py +++ b/snyk/managers.py @@ -192,6 +192,8 @@ def get(self, id: str): del project_data["tags"] except KeyError: pass + if project_data["totalDependencies"] is None: + project_data["totalDependencies"] = 0 project_klass = self.klass.from_dict(project_data) project_klass.organization = self.instance return project_klass