HostServiceBlacklist: fix exception in branches

This commit is contained in:
Thomas Gelf 2021-10-18 07:46:27 +02:00
parent 4916ce3529
commit ce3ec67eb6

View File

@ -61,7 +61,7 @@ class HostServiceBlacklist
public function fetchMappingsForService(IcingaService $service) public function fetchMappingsForService(IcingaService $service)
{ {
if (! $service->hasBeenLoadedFromDb()) { if (! $service->hasBeenLoadedFromDb() || $service->get('id') === null) {
return []; return [];
} }