mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24: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();
|
||||
}
|
||||
|
||||
$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 {
|
||||
throw new ProgrammingError(
|
||||
'Unable to understand "%s" inheritance',
|
||||
|
Loading…
x
Reference in New Issue
Block a user