mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
UuidLookup: host_id VS host in branch
This commit is contained in:
parent
8b1513830c
commit
ae0992f196
@ -99,6 +99,10 @@ class UuidLookup
|
||||
$query = self::addKeyToQuery($connection, $db->select()->from($table, 'uuid'), $key);
|
||||
$uuid = self::fetchOptionalUuid($connection, $query);
|
||||
if ($uuid === null && $branch->isBranch()) {
|
||||
if (is_array($key) && isset($key['host_id'])) {
|
||||
$key['host'] = IcingaHost::load($key['host_id'], $connection)->getObjectName();
|
||||
unset($key['host_id']);
|
||||
}
|
||||
$query = self::addKeyToQuery($connection, $db->select()->from("branched_$table", 'uuid'), $key);
|
||||
$query->where('branch_uuid = ?', $connection->quoteBinary($branch->getUuid()->getBytes()));
|
||||
$uuid = self::fetchOptionalUuid($connection, $query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user