Fixed missing item case in uptime feature.

This commit is contained in:
Christian P. MOMON 2021-06-19 11:00:41 +02:00
parent 85c311a260
commit 378bde2d73

View file

@ -325,10 +325,14 @@ public class UptimeJournal
Service current = iterator.next(); Service current = iterator.next();
if (current.getWebsiteURL() != null) if (current.getWebsiteURL() != null)
{ {
if (getUptimes(current.getWebsiteURL()).last().getStatus() == UptimeStatus.ERROR) Uptimes currentUptimes = getUptimes(current.getWebsiteURL());
if (!currentUptimes.isEmpty())
{ {
ended = true; if (currentUptimes.last().getStatus() == UptimeStatus.ERROR)
result = true; {
ended = true;
result = true;
}
} }
} }
} }