mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
IcingaService: force object_type=template when...
...loading a service by name fixes #1094
This commit is contained in:
parent
2b386fa856
commit
bab28b1755
@ -415,6 +415,21 @@ class IcingaService extends IcingaObject
|
|||||||
return $zone;
|
return $zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createWhere()
|
||||||
|
{
|
||||||
|
$where = parent::createWhere();
|
||||||
|
if (! $this->hasBeenLoadedFromDb()) {
|
||||||
|
if (null === $this->get('service_set_id')
|
||||||
|
&& null === $this->get('host_id')
|
||||||
|
&& null === $this->get('id')
|
||||||
|
) {
|
||||||
|
$where .= " AND object_type = 'template'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $where;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Duplicate code, clean this up, split it into multiple methods
|
// TODO: Duplicate code, clean this up, split it into multiple methods
|
||||||
public static function enumProperties(
|
public static function enumProperties(
|
||||||
Db $connection = null,
|
Db $connection = null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user