Skip to content

Commit 62f1c88

Browse files
micha91ewuerger
andcommitted
refactor: Apply changes from review
Co-authored-by: Ernst Würger <50786483+ewuerger@users.noreply.github.com>
1 parent 3ea343d commit 62f1c88

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

polarion_rest_api_client/client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,19 +806,18 @@ def update_work_item(
806806
fields will stay untouched.
807807
"""
808808
assert work_item.id is not None
809-
work_item_type = work_item.type or oa_types.UNSET
810-
if work_item_type:
809+
if work_item.type:
811810
logger.warning(
812-
"You are attempting to change the type of Work Item %s to %s.",
811+
"Attempting to change the type of Work Item %s to %s.",
813812
work_item.id,
814-
work_item_type,
813+
work_item.type,
815814
)
816815

817816
response = patch_work_item.sync_detailed(
818817
self.project_id,
819818
work_item.id,
820819
client=self.client,
821-
change_type_to=work_item_type,
820+
change_type_to=work_item.type or oa_types.UNSET,
822821
body=self._build_work_item_patch_request(work_item),
823822
)
824823

0 commit comments

Comments
 (0)