mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
SyncPropertyForm: choosing imports should not fail
...with no templates available
This commit is contained in:
parent
dc7f9ac039
commit
3d64550802
@ -75,7 +75,10 @@ class SyncPropertyForm extends DirectorObjectForm
|
||||
if ($destination === 'import') {
|
||||
$funcTemplates = 'enum' . ucfirst($this->rule->object_type) . 'Templates';
|
||||
$templates = $this->db->$funcTemplates();
|
||||
$templates = array_combine($templates, $templates);
|
||||
if (! empty($templates)) {
|
||||
$templates = array_combine($templates, $templates);
|
||||
}
|
||||
|
||||
$this->addElement('select', 'source_expression', array(
|
||||
'label' => $this->translate('Template'), // Objecttype?
|
||||
'multiOptions' => $this->optionalEnum($templates),
|
||||
|
Loading…
x
Reference in New Issue
Block a user