From 9900f1f5f71b958354ee25a5f561c4a640ed7a6a Mon Sep 17 00:00:00 2001 From: ewuerger Date: Fri, 3 Nov 2023 11:20:53 +0100 Subject: [PATCH] fix: Fix work items lookup in `patch_work_items` --- capella2polarion/elements/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/capella2polarion/elements/__init__.py b/capella2polarion/elements/__init__.py index ab9c208a..b0996b38 100644 --- a/capella2polarion/elements/__init__.py +++ b/capella2polarion/elements/__init__.py @@ -131,13 +131,14 @@ def patch_work_items(ctx: dict[str, t.Any]) -> None: ctx The context for the workitem operation to be processed. """ + work_items_lookup = ctx["POLARION_WI_MAP"] | ctx["WORK_ITEMS"] def add_content( obj: common.GenericElement | diag.Diagram, - ctx: dict[str, t.Any], + _: dict[str, t.Any], **kwargs, ) -> serialize.CapellaWorkItem: - work_item = ctx["WORK_ITEMS"][obj.uuid] + work_item = work_items_lookup[obj.uuid] for key, value in kwargs.items(): if getattr(work_item, key, None) is None: continue