mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
DirectorJob: fix timeperiod handling
This commit is contained in:
parent
df631f506e
commit
8ac5d954e9
@ -89,9 +89,7 @@ class DirectorJob extends DbObjectWithSettings
|
||||
public function isWithinTimeperiod()
|
||||
{
|
||||
if ($this->hasTimeperiod()) {
|
||||
if (! $this->timeperiod()->isActive()) {
|
||||
return false;
|
||||
}
|
||||
return $this->timeperiod()->isActive();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
@ -109,6 +107,6 @@ class DirectorJob extends DbObjectWithSettings
|
||||
|
||||
protected function timeperiod()
|
||||
{
|
||||
return IcingaTimeperiod::load($this->timeperiod_id, $this->db);
|
||||
return IcingaTimePeriod::loadWithAutoIncId($this->timeperiod_id, $this->connection);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user