mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +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()
|
public function isWithinTimeperiod()
|
||||||
{
|
{
|
||||||
if ($this->hasTimeperiod()) {
|
if ($this->hasTimeperiod()) {
|
||||||
if (! $this->timeperiod()->isActive()) {
|
return $this->timeperiod()->isActive();
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -109,6 +107,6 @@ class DirectorJob extends DbObjectWithSettings
|
|||||||
|
|
||||||
protected function timeperiod()
|
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