mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-05-28 04:35:53 -04:00
IcingaServiceSet: createWhere() look for template
...in case no host_id has been set
This commit is contained in:
parent
6685066673
commit
c2afacc11b
1 changed files with 12 additions and 0 deletions
|
|
@ -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()
|
||||
{
|
||||
parent::beforeStore();
|
||||
|
|
|
|||
Loading…
Reference in a new issue