IcingaHostSelfServiceForm: ignore empty values
This commit is contained in:
parent
3f657a01c8
commit
e0c0662be1
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
-----
|
||||
|
||||
|
|
Loading…
Reference in New Issue