mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
HostgroupRestriction: do not fail on hosts w/o ID
This commit is contained in:
parent
70c0b8f247
commit
b12d50a16a
@ -56,7 +56,8 @@ class HostgroupRestriction extends ObjectRestriction
|
||||
return true;
|
||||
}
|
||||
|
||||
if (! $host->hasBeenLoadedFromDb() || $host->hasModifiedGroups()) {
|
||||
// Hint: branched hosts have no id
|
||||
if (! $host->hasBeenLoadedFromDb() || $host->hasModifiedGroups() || $host->get('id') === null) {
|
||||
foreach ($this->listRestrictedHostgroups() as $group) {
|
||||
if ($host->hasGroup($group)) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user