mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
IcingaServiceSet: do not delete Services w/o id
This commit is contained in:
parent
166b862114
commit
8b1513830c
@ -278,7 +278,9 @@ class IcingaServiceSet extends IcingaObject implements ExportInterface
|
||||
if ($hostId) {
|
||||
$deleteIds = [];
|
||||
foreach ($this->getServiceObjects() as $service) {
|
||||
$deleteIds[] = (int) $service->get('id');
|
||||
if ($idToDelete = $service->get('id')) {
|
||||
$deleteIds[] = (int) $idToDelete;
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($deleteIds)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user