mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaObject: provide combined keys for imports
This commit is contained in:
parent
81efcd0e8e
commit
79748f0c4c
@ -267,7 +267,15 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
if ($this->importedObjects === null) {
|
||||
$this->importedObjects = array();
|
||||
foreach ($this->imports()->listImportNames() as $import) {
|
||||
$this->importedObjects[$import] = self::load($import, $this->connection);
|
||||
if (is_array($this->getKeyName())) {
|
||||
// Affects services only:
|
||||
$this->importedObjects[$import] = self::load(
|
||||
array('object_name' => $import),
|
||||
$this->connection
|
||||
);
|
||||
} else {
|
||||
$this->importedObjects[$import] = self::load($import, $this->connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user