@@ -24,24 +24,24 @@ def base_query(latest:)
2424
2525 def fetch_with_query ( test_groups :, query :)
2626 latest_test_runs = TestRun
27- . joins ( grouping : :group )
28- . joins ( "INNER JOIN (#{ query . to_sql } ) latest_test_run_by_grouping \
27+ . joins ( grouping : :group )
28+ . joins ( "INNER JOIN (#{ query . to_sql } ) latest_test_run_by_grouping \
2929 ON latest_test_run_by_grouping.grouping_id = test_runs.grouping_id \
3030 AND latest_test_run_by_grouping.test_runs_created_at = test_runs.created_at")
31- . select ( 'id' , 'test_runs.grouping_id' , 'groups.group_name' )
32- . to_sql
31+ . select ( 'id' , 'test_runs.grouping_id' , 'groups.group_name' )
32+ . to_sql
3333
3434 test_groups . joins ( test_group_results : :test_results )
35- . joins ( "INNER JOIN (#{ latest_test_runs } ) latest_test_runs \
35+ . joins ( "INNER JOIN (#{ latest_test_runs } ) latest_test_runs \
3636 ON test_group_results.test_run_id = latest_test_runs.id")
37- . select ( 'test_groups.name' ,
38- 'test_groups.id as test_groups_id' ,
39- 'latest_test_runs.group_name' ,
40- 'test_results.name as test_result_name' ,
41- 'test_results.status' ,
42- 'test_results.marks_earned' ,
43- 'test_results.marks_total' ,
44- :output , :extra_info , :error_type )
37+ . select ( 'test_groups.name' ,
38+ 'test_groups.id as test_groups_id' ,
39+ 'latest_test_runs.group_name' ,
40+ 'test_results.name as test_result_name' ,
41+ 'test_results.status' ,
42+ 'test_results.marks_earned' ,
43+ 'test_results.marks_total' ,
44+ :output , :extra_info , :error_type )
4545 end
4646 end
4747 end
@@ -90,7 +90,7 @@ def as_csv
9090
9191 def as_json
9292 @test_results . group_by ( &:group_name ) . transform_values do |grouping |
93- grouping . group_by ( &:name )
93+ grouping . group_by ( &:name )
9494 end . to_json
9595 end
9696 end
0 commit comments