Merge branch 'fix/host-templates-not-usable-with-hostgroup-restriction-#2020'

This commit is contained in:
Thomas Gelf 2020-04-01 20:56:46 +02:00
commit b6284e7898
1 changed files with 3 additions and 5 deletions

View File

@ -57,11 +57,9 @@ class HostgroupRestriction extends ObjectRestriction
}
if (! $host->hasBeenLoadedFromDb()) {
if ($host->hasModifiedGroups()) {
foreach ($this->listRestrictedHostgroups() as $group) {
if ($host->hasGroup($group)) {
return true;
}
foreach ($this->listRestrictedHostgroups() as $group) {
if ($host->hasGroup($group)) {
return true;
}
}