From 512ee9ba871d4019fd3127515d1f84a44a11974f Mon Sep 17 00:00:00 2001 From: ldericher <40151420+ldericher@users.noreply.github.com> Date: Wed, 17 Nov 2021 15:58:31 +0100 Subject: [PATCH] fix: get_project on nonexistent project --- kiwi_scp/instance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kiwi_scp/instance.py b/kiwi_scp/instance.py index b94a4fb..84f7c22 100644 --- a/kiwi_scp/instance.py +++ b/kiwi_scp/instance.py @@ -132,5 +132,8 @@ class Instance: def get_project(self, project_name: str) -> Optional[Project]: project = Instance.__get_project(self.directory, project_name) + if project is None: + return + project.instance = self return project