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…
Reference in New Issue