Skip to content

Commit

Permalink
refactor: Apply changes from review
Browse files Browse the repository at this point in the history
Co-authored-by: Ernst Würger <[email protected]>
  • Loading branch information
micha91 and ewuerger committed Jan 17, 2024
1 parent 3ea343d commit 62f1c88
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions polarion_rest_api_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,19 +806,18 @@ def update_work_item(
fields will stay untouched.
"""
assert work_item.id is not None
work_item_type = work_item.type or oa_types.UNSET
if work_item_type:
if work_item.type:
logger.warning(
"You are attempting to change the type of Work Item %s to %s.",
"Attempting to change the type of Work Item %s to %s.",
work_item.id,
work_item_type,
work_item.type,
)

response = patch_work_item.sync_detailed(
self.project_id,
work_item.id,
client=self.client,
change_type_to=work_item_type,
change_type_to=work_item.type or oa_types.UNSET,
body=self._build_work_item_patch_request(work_item),
)

Expand Down

0 comments on commit 62f1c88

Please sign in to comment.