Skip to content

Commit

Permalink
#13109-added check to see if logs is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwinn11 committed May 23, 2024
1 parent 06bfafd commit fa70739
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/teammates/logic/api/LogsProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public int getNumberOfLogsForEvent(Instant startTime, Instant endTime, LogEvent
QueryLogsResults logFetchResults = queryLogs(logsParams);
List<GeneralLogEntry> logs = logFetchResults.getLogEntries();
total += logs.size();
if (logFetchResults.getHasNextPage()) {
logStartTime = logs.get(logs.size() - 1).getTimestamp();
if (logFetchResults.getHasNextPage() && !logs.isEmpty()) {
logStartTime = logs.getLast().getTimestamp();
} else {
break;
}
Expand Down

0 comments on commit fa70739

Please sign in to comment.