diff --git a/elementary/monitor/api/tests/tests.py b/elementary/monitor/api/tests/tests.py index 6d8ace6f2..ccf16cef4 100644 --- a/elementary/monitor/api/tests/tests.py +++ b/elementary/monitor/api/tests/tests.py @@ -168,12 +168,12 @@ def get_test_results( for test_result in filtered_test_results_db_rows if test_result.invocation_id == invocation_id ] - - filtered_test_results_db_rows = [ - test_result - for test_result in filtered_test_results_db_rows - if test_result.invocations_rank_index == 1 - ] + else: + filtered_test_results_db_rows = [ + test_result + for test_result in filtered_test_results_db_rows + if test_result.invocations_rank_index == 1 + ] tests_results: DefaultDict[str, List[TestResultSchema]] = defaultdict(list) for test_result_db_row in filtered_test_results_db_rows: