Skip to content

Commit

Permalink
merge: Merge pull request #23 from DSD-DBS/fix-patch-work-items
Browse files Browse the repository at this point in the history
fix: Fix work items lookup in `patch_work_items`
  • Loading branch information
ewuerger authored Nov 3, 2023
2 parents 1985dfd + 9900f1f commit d344902
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions capella2polarion/elements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d344902

Please sign in to comment.