Skip to content

Commit 51124a8

Browse files
committed
Add parent item ID check
1 parent 634ac32 commit 51124a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_reportportal/service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,14 @@ def _lock(self, leaf, func):
404404

405405
def _build_start_suite_rq(self, leaf):
406406
code_ref = str(leaf['item']) if leaf['type'] == LeafType.DIR else str(leaf['item'].fspath)
407+
parent_item_id = self._lock(leaf['parent'], lambda p: p.get('item_id')) if 'parent' in leaf else None
407408
payload = {
408409
'name': self._get_item_name(leaf['name']),
409410
'description': self._get_item_description(leaf['item']),
410411
'start_time': timestamp(),
411412
'item_type': 'SUITE',
412413
'code_ref': code_ref,
413-
'parent_item_id': self._lock(leaf['parent'], lambda p: p['item_id'])
414+
'parent_item_id': parent_item_id
414415
}
415416
return payload
416417

0 commit comments

Comments
 (0)