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,13 +325,17 @@ public class UptimeJournal
Service current = iterator.next();
if (current.getWebsiteURL() != null)
{
if (getUptimes(current.getWebsiteURL()).last().getStatus() == UptimeStatus.ERROR)
Uptimes currentUptimes = getUptimes(current.getWebsiteURL());
if (!currentUptimes.isEmpty())
{
if (currentUptimes.last().getStatus() == UptimeStatus.ERROR)
{
ended = true;
result = true;
}
}
}
}
else
{
ended = true;