IcingaObject: do not load resolved memberships...
...for unstored objects
This commit is contained in:
parent
694cacb464
commit
a2016e99c0
|
@ -866,6 +866,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||||
if (! $this instanceof IcingaHost) {
|
if (! $this instanceof IcingaHost) {
|
||||||
throw new RuntimeException('getAppliedGroups is only available for hosts currently!');
|
throw new RuntimeException('getAppliedGroups is only available for hosts currently!');
|
||||||
}
|
}
|
||||||
|
if (! $this->hasBeenLoadedFromDb()) {
|
||||||
|
// There are no stored related/resolved groups. We'll also not resolve
|
||||||
|
// them here on demand.
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$type = strtolower($this->getType());
|
$type = strtolower($this->getType());
|
||||||
$query = $this->db->select()->from(
|
$query = $this->db->select()->from(
|
||||||
|
|
Loading…
Reference in New Issue