Skip to content

Commit

Permalink
Add parent item ID check
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Oct 21, 2024
1 parent 634ac32 commit 51124a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytest_reportportal/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,14 @@ def _lock(self, leaf, func):

def _build_start_suite_rq(self, leaf):
code_ref = str(leaf['item']) if leaf['type'] == LeafType.DIR else str(leaf['item'].fspath)
parent_item_id = self._lock(leaf['parent'], lambda p: p.get('item_id')) if 'parent' in leaf else None
payload = {
'name': self._get_item_name(leaf['name']),
'description': self._get_item_description(leaf['item']),
'start_time': timestamp(),
'item_type': 'SUITE',
'code_ref': code_ref,
'parent_item_id': self._lock(leaf['parent'], lambda p: p['item_id'])
'parent_item_id': parent_item_id
}
return payload

Expand Down

0 comments on commit 51124a8

Please sign in to comment.