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()
|
||||
{
|
||||
parent::beforeStore();
|
||||
|
|
Loading…
Reference in New Issue