diff --git a/resources/test_packs/pilot/test_pack.py b/resources/test_packs/pilot/test_pack.py index 42cbe2dcc..35174a536 100644 --- a/resources/test_packs/pilot/test_pack.py +++ b/resources/test_packs/pilot/test_pack.py @@ -46,10 +46,11 @@ def get_steps_to_resolve(json_data): # Collect all tests with recommendations for test in json_data["tests"]["results"]: - if "optional_recommendations" in test: + if "recommendations" in test: steps.append(test) - - if len(steps) < 3: + if not steps: + return steps + elif len(steps) < 3: return [steps] splitted = [steps[:3]] index = 3 diff --git a/resources/test_packs/qualification/test_pack.py b/resources/test_packs/qualification/test_pack.py index 4dee8c12e..d3f3cc9ac 100644 --- a/resources/test_packs/qualification/test_pack.py +++ b/resources/test_packs/qualification/test_pack.py @@ -44,8 +44,9 @@ def get_steps_to_resolve(json_data): for test in json_data["tests"]["results"]: if "recommendations" in test: steps.append(test) - - if len(steps) < 4: + if not steps: + return steps + elif len(steps) < 4: return [steps] splitted = [steps[:4]] index = 4