Skip to content

Commit

Permalink
LRSD-4332 Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchandotcom committed May 14, 2024
1 parent 2f5764a commit e65a425
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -104,16 +105,12 @@ public Object getTestrayRunComparisonByTestrayRoutineIdTestrayRoutine(
sb.append("b.r_routineToBuilds_c_routineId = ? order by b.dueDate_ ");
sb.append("desc limit 2");

List<Object> params = new ArrayList<>();

params.add(testrayRoutineId);

String sql = StringUtil.replace(
sb.toString(), "[%COMPANY_ID%]",
String.valueOf(contextCompany.getCompanyId()));

List<Map<String, Object>> values = TestrayUtil.executeQuery(
sql, params);
sql, Collections.singletonList(testrayRoutineId));

if (ListUtil.isEmpty(values) || (values.size() < 2)) {
throw new Exception("Unable to find more than one run");
Expand Down

0 comments on commit e65a425

Please sign in to comment.