mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +02:00
IcingaObjectFilterHelper: do not fail with no...
...involved parents (indirect inheritance with no child template)
This commit is contained in:
parent
d61b93d63d
commit
9f96b1d31b
@ -70,7 +70,11 @@ class IcingaObjectFilterHelper
|
|||||||
$ids[] = $template->getAutoincId();
|
$ids[] = $template->getAutoincId();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sub->where("$i.parent_${type}_id IN (?)", $ids);
|
if (empty($ids)) {
|
||||||
|
$sub->where('(1 = 0)');
|
||||||
|
} else {
|
||||||
|
$sub->where("$i.parent_${type}_id IN (?)", $ids);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new ProgrammingError(
|
throw new ProgrammingError(
|
||||||
'Unable to understand "%s" inheritance',
|
'Unable to understand "%s" inheritance',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user