IcingaAddServiceForm: use branches
This commit is contained in:
parent
6201fb52e4
commit
95c8884ea6
|
@ -161,10 +161,11 @@ class IcingaAddServiceForm extends DirectorObjectForm
|
|||
$plain = $this->object->toPlainObject();
|
||||
$db = $this->object->getConnection();
|
||||
|
||||
// TODO: Test this:
|
||||
foreach ($this->hosts as $host) {
|
||||
IcingaService::fromPlainObject($plain, $db)
|
||||
->set('host_id', $host->get('id'))
|
||||
->store();
|
||||
$service = IcingaService::fromPlainObject($plain, $db)
|
||||
->set('host_id', $host->get('id'));
|
||||
$this->getDbObjectStore()->store($service);
|
||||
}
|
||||
|
||||
$msg = sprintf(
|
||||
|
|
Loading…
Reference in New Issue