$row->state->in_downtime and $row->state->is_acknowledged are used as boolens in if condition

This commit is contained in:
raviks789 2022-02-15 12:44:24 +01:00
parent ab4728ad54
commit 34626cbec5

View file

@ -134,10 +134,10 @@ class IcingaDbState
if ($row->state->last_state_change !== null) {
$node->setLastStateChange($row->state->last_state_change/1000);
}
if ($row->state->in_downtime === 'y') {
if ($row->state->in_downtime) {
$node->setDowntime(true);
}
if ($row->state->is_acknowledged !== 'n') {
if ($row->state->is_acknowledged) {
$node->setAck(true);
}