Skip to content

Commit

Permalink
changes requested
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioG70 committed Dec 5, 2023
1 parent 5a215df commit 7bc8e27
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ public void notify(ModelService model, IndexService index, Job job, JobStats job
StringBuilder builder = new StringBuilder();

for (IndexedReport report : reports) {
List<Report> reportsList = RodaCoreFactory.getModelService().retrieveJobReport(report.getJobId(), report.getId()).getReports();
Report last = reportsList.get(reportsList.size() - 1);
builder.append(last.getPluginDetails()).append("\n\n");
List<Report> reportsList = model.retrieveJobReport(report.getJobId(), report.getId()).getReports();
if (reportsList != null && !reportsList.isEmpty()) {
Report last = reportsList.get(reportsList.size() - 1);
builder.append(last.getPluginDetails()).append("\n\n");
}
}

scopes.put("failures", new Handlebars.SafeString(builder.toString()));
Expand Down

0 comments on commit 7bc8e27

Please sign in to comment.