DirectorObjectForm: templates have no choices

fixes #1363
This commit is contained in:
Thomas Gelf 2018-05-29 23:15:17 +02:00
parent cf5b7c7001
commit f3056c6f2c
1 changed files with 4 additions and 0 deletions

View File

@ -1116,6 +1116,10 @@ abstract class DirectorObjectForm extends DirectorForm
*/
protected function addChoices($type)
{
if ($this->isTemplate()) {
return $this;
}
$connection = $this->getDb();
$choiceType = 'TemplateChoice' . ucfirst($type);
$choices = IcingaObject::loadAllByType($choiceType, $connection);