IcingaAddServiceForm: avoid duplicate get() call

This commit is contained in:
Thomas Gelf 2022-02-06 11:30:47 +01:00
parent b6f6b786c5
commit 351c41cb3c

View File

@ -154,7 +154,7 @@ class IcingaAddServiceForm extends DirectorObjectForm
{
if ($this->host !== null) {
if ($id = $this->host->get('id')) {
$this->object->set('host_id', $this->host->get('id'));
$this->object->set('host_id', $id);
} else {
$this->object->set('host', $this->host->getObjectName());
}