Skip to content

Commit 9329bc9

Browse files
micha91ewuerger
andcommitted
refactor: Apply changes from review
Co-authored-by: Ernst Würger <[email protected]>
1 parent 520feef commit 9329bc9

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
@@ -846,19 +846,18 @@ def update_work_item(
846846
fields will stay untouched.
847847
"""
848848
assert work_item.id is not None
849-
work_item_type = work_item.type or oa_types.UNSET
850-
if work_item_type:
849+
if work_item.type:
851850
logger.warning(
852-
"You are attempting to change the type of Work Item %s to %s.",
851+
"Attempting to change the type of Work Item %s to %s.",
853852
work_item.id,
854-
work_item_type,
853+
work_item.type,
855854
)
856855

857856
response = patch_work_item.sync_detailed(
858857
self.project_id,
859858
work_item.id,
860859
client=self.client,
861-
change_type_to=work_item_type,
860+
change_type_to=work_item.type or oa_types.UNSET,
862861
body=self._build_work_item_patch_request(work_item),
863862
)
864863

0 commit comments

Comments
 (0)