diff --git a/application/forms/IcingaHostSelfServiceForm.php b/application/forms/IcingaHostSelfServiceForm.php index bc664a53..ded96a99 100644 --- a/application/forms/IcingaHostSelfServiceForm.php +++ b/application/forms/IcingaHostSelfServiceForm.php @@ -108,7 +108,9 @@ class IcingaHostSelfServiceForm extends DirectorForm $propertyNames = ['display_name', 'address', 'address6']; foreach ($propertyNames as $property) { - $host->set($property, $this->getValue($property)); + if (\strlen($value = $this->getValue($property)) > 0) { + $host->set($property, $value); + } } } else { $host = IcingaHost::create(array_filter($this->getValues(), 'strlen'), $db); diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index 175b34f0..9db5bcb4 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -17,6 +17,9 @@ next (will be 1.8.0) * FEATURE: Inspect is now available for Packages, Stages and Files (#1995) * FEATURE: Allow to disable the Director frontend / UI (#2007) +### REST API +* FEATURE: Self Service API ignores empty/missing properties (e.g. no address) + 1.7.2 -----