mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
UuidLookup: fix host/set related fallback
This commit is contained in:
parent
8bfbe2a80f
commit
410913e512
@ -47,15 +47,21 @@ class UuidLookup
|
||||
|
||||
if ($uuid === null && $branch->isBranch()) {
|
||||
// TODO: use different tables?
|
||||
$query = $db->select()->from('branched_icinga_service', 'uuid')->where('object_type = ?', $objectType);
|
||||
$query = $db->select()
|
||||
->from('branched_icinga_service', 'uuid')
|
||||
->where('branch_uuid = ?', $connection->quoteBinary($branch->getUuid()->getBytes()));
|
||||
if ($objectType) {
|
||||
$query->where('object_type = ?', $objectType);
|
||||
}
|
||||
$query = self::addKeyToQuery($connection, $query, $key);
|
||||
if ($host) {
|
||||
// TODO: uuid?
|
||||
$query->add('host = ?', $host->getObjectName());
|
||||
$query->where('host = ?', $host->getObjectName());
|
||||
}
|
||||
if ($set) {
|
||||
$query->add('service_set = ?', $set->getObjectName());
|
||||
$query->where('service_set = ?', $set->getObjectName());
|
||||
}
|
||||
|
||||
$uuid = self::fetchOptionalUuid($connection, $query);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user