Skip to content

Commit

Permalink
refactor: Apply requested change from review to patch_work_items
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Dec 12, 2023
1 parent 987298f commit 136fadf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions capella2polarion/elements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ def patch_work_items(ctx: dict[str, t.Any]) -> None:
objects = ctx["MODEL"].diagrams

obj = objects.by_uuid(uuid)
work_item: serialize.CapellaWorkItem
if (work_item := ctx["WORK_ITEMS"][uuid]) is None:
continue
work_item: serialize.CapellaWorkItem = ctx["WORK_ITEMS"][uuid]
old_work_item: serialize.CapellaWorkItem = ctx["POLARION_WI_MAP"][uuid]

links = element.create_links(obj, ctx)
Expand All @@ -161,8 +159,6 @@ def patch_work_items(ctx: dict[str, t.Any]) -> None:

for uuid in uuids:
new_work_item: serialize.CapellaWorkItem = ctx["WORK_ITEMS"][uuid]
if (new_work_item := ctx["WORK_ITEMS"][uuid]) is None:
continue
old_work_item = ctx["POLARION_WI_MAP"][uuid]
if old_work_item.id in back_links:
element.create_grouped_back_link_fields(
Expand Down

0 comments on commit 136fadf

Please sign in to comment.