Skip to content

Commit 3dac71b

Browse files
micha91ewuerger
andauthored
refactor: Add changes from review
Co-authored-by: Ernst Würger <50786483+ewuerger@users.noreply.github.com>
1 parent 11d0da8 commit 3dac71b

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

polarion_rest_api_client/client.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -658,19 +658,17 @@ def _generate_work_item(
658658
if attachment.id
659659
]
660660

661+
desctype = None
662+
desc = None
663+
if work_item.attributes.description:
664+
desctype = unset_str_builder(work_item.attributes.description.type)
665+
desc = unset_str_builder(work_item.attributes.description.value)
666+
661667
work_item_obj = self._work_item(
662668
work_item_id,
663669
unset_str_builder(work_item.attributes.title),
664-
(
665-
unset_str_builder(work_item.attributes.description.type)
666-
if work_item.attributes.description
667-
else None
668-
),
669-
(
670-
unset_str_builder(work_item.attributes.description.value)
671-
if work_item.attributes.description
672-
else None
673-
),
670+
desctype,
671+
desc,
674672
unset_str_builder(work_item.attributes.type),
675673
unset_str_builder(work_item.attributes.status),
676674
work_item.attributes.additional_properties,

0 commit comments

Comments
 (0)