mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
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) {
|
||||
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());
|
||||
$query = $this->db->select()->from(
|
||||
|
Loading…
x
Reference in New Issue
Block a user