Skip to content

Commit

Permalink
Add check for removed workitems #138 (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper-raemaekers authored Oct 8, 2023
1 parent 8fdf17e commit e164dc3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions polarion/workitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,12 @@ def getLinkedItemWithRoles(self):
service = self._polarion.getService('Tracker')
if self.linkedWorkItems is not None:
for linked_item in self.linkedWorkItems.LinkedWorkItem:
linked_items.append((linked_item.role.id, Workitem(self._polarion, self._project, uri=linked_item.workItemURI)))
if linked_item.role is not None:
linked_items.append((linked_item.role.id, Workitem(self._polarion, self._project, uri=linked_item.workItemURI)))
if self.linkedWorkItemsDerived is not None:
for linked_item in self.linkedWorkItemsDerived.LinkedWorkItem:
linked_items.append((linked_item.role.id, Workitem(self._polarion, self._project, uri=linked_item.workItemURI)))
if linked_item.role is not None:
linked_items.append((linked_item.role.id, Workitem(self._polarion, self._project, uri=linked_item.workItemURI)))
return linked_items

def getLinkedItem(self):
Expand Down

0 comments on commit e164dc3

Please sign in to comment.