DirectorObjectForm: skip empty related sets...
...provides as objects fixes #13605
This commit is contained in:
parent
65181ca67e
commit
3d8ccf2448
|
@ -664,6 +664,14 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
$key = $element->getName();
|
||||
if ($object->hasProperty($key)) {
|
||||
$value = $object->get($key);
|
||||
if ($object instanceof IcingaObject) {
|
||||
if ($object->propertyIsRelatedSet($key)) {
|
||||
if (! count((array) $value)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($value !== null) {
|
||||
$element->setValue($value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue