From 15cef04de7cce59eee08bc16f8f8525fb966d87c Mon Sep 17 00:00:00 2001 From: Tim Davies Date: Tue, 16 Jul 2024 11:43:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Avoid=20`KeyError`=20when=20`der?= =?UTF-8?q?ivedSymbolData`=20is=20omitted=20when=20detaching=20instances?= =?UTF-8?q?=20(#127)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💥 Avoid `KeyError` when `derivedSymbolData` is omitted --- src/converter/instance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/converter/instance.py b/src/converter/instance.py index a6f4fa8..9727ba4 100644 --- a/src/converter/instance.py +++ b/src/converter/instance.py @@ -240,7 +240,9 @@ def detach_symbol(fig_instance, all_overrides): # Apply overrides to children for c in detached_children: - apply_overrides(c, fig_instance["guid"], all_overrides, fig_instance["derivedSymbolData"]) + apply_overrides( + c, fig_instance["guid"], all_overrides, fig_instance.get("derivedSymbolData", []) + ) fig_instance["children"] = detached_children fig_instance["type"] = "FRAME"