From dc24a2593a6e8d4a8190fb2d8ca2117ae9bee243 Mon Sep 17 00:00:00 2001 From: mistangl Date: Mon, 5 Feb 2024 21:51:33 +0100 Subject: [PATCH] =?UTF-8?q?Falls=20das=20Modell=20nach=20einem=20Key=20gef?= =?UTF-8?q?ragt=20wird,=20den=20es=20nicht=20gibt,=20als=20Default=20none?= =?UTF-8?q?=20zur=C3=BCck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/caditem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/caditem.py b/lib/caditem.py index f4146e6..5e6510e 100644 --- a/lib/caditem.py +++ b/lib/caditem.py @@ -182,7 +182,10 @@ class CadItem(): self.gui_data[key] = val def get_gui_data(self, key): - return self.gui_data[key] + if key in self.gui_data: + return self.gui_data[key] + else: + return None def get_all_gui_data(self): return self.gui_data