mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
IcingaServiceSet: createWhere() look for template
...in case no host_id has been set
This commit is contained in:
parent
6685066673
commit
c2afacc11b
@ -249,6 +249,18 @@ class IcingaServiceSet extends IcingaObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createWhere()
|
||||||
|
{
|
||||||
|
$where = parent::createWhere();
|
||||||
|
if (! $this->hasBeenLoadedFromDb()) {
|
||||||
|
if (null === $this->get('host_id') && null === $this->get('id')) {
|
||||||
|
$where .= " AND object_type = 'template'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $where;
|
||||||
|
}
|
||||||
|
|
||||||
protected function beforeStore()
|
protected function beforeStore()
|
||||||
{
|
{
|
||||||
parent::beforeStore();
|
parent::beforeStore();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user