IcingaObjectMultiRelations: fix service relations
...for sets
This commit is contained in:
parent
34ed3da3b8
commit
0a26b94e7c
|
@ -186,7 +186,15 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
||||||
|
|
||||||
$connection = $this->object->getConnection();
|
$connection = $this->object->getConnection();
|
||||||
try {
|
try {
|
||||||
|
// Related services can only be objects, used by ServiceSets
|
||||||
|
if ($class === 'Icinga\\Module\\Director\\Objects\\IcingaService') {
|
||||||
|
$relation = $class::load(array(
|
||||||
|
'object_name' => $relation,
|
||||||
|
'object_type' => 'template'
|
||||||
|
), $connection);
|
||||||
|
} else {
|
||||||
$relation = $class::load($relation, $connection);
|
$relation = $class::load($relation, $connection);
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
switch ($onError) {
|
switch ($onError) {
|
||||||
|
|
Loading…
Reference in New Issue