From 9329bc9a3c6d81390d6aecbf558bf5fce720d88d Mon Sep 17 00:00:00 2001 From: micha91 Date: Wed, 17 Jan 2024 11:22:16 +0100 Subject: [PATCH] refactor: Apply changes from review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernst Würger <50786483+ewuerger@users.noreply.github.com> --- polarion_rest_api_client/client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/polarion_rest_api_client/client.py b/polarion_rest_api_client/client.py index e870327f..ce49dcde 100644 --- a/polarion_rest_api_client/client.py +++ b/polarion_rest_api_client/client.py @@ -846,19 +846,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), )