mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +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) {
|
if ($hostId) {
|
||||||
$deleteIds = [];
|
$deleteIds = [];
|
||||||
foreach ($this->getServiceObjects() as $service) {
|
foreach ($this->getServiceObjects() as $service) {
|
||||||
$deleteIds[] = (int) $service->get('id');
|
if ($idToDelete = $service->get('id')) {
|
||||||
|
$deleteIds[] = (int) $idToDelete;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($deleteIds)) {
|
if (! empty($deleteIds)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user