ConfigController: do not fail without a valid...

...deployment endpoint

refs #918
This commit is contained in:
Thomas Gelf 2017-09-28 20:18:25 +02:00
parent 9fd66dbe99
commit b50a360ff1
1 changed files with 6 additions and 4 deletions

View File

@ -150,10 +150,12 @@ class ConfigController extends ActionController
)); ));
} }
if ($this->hasPermission('director/deploy')) { if ($this->hasPermission('director/deploy')) {
$this->actions()->add(DeployConfigForm::load() if ($this->db()->hasDeploymentEndpoint()) {
->setDb($this->db()) $this->actions()->add(DeployConfigForm::load()
->setApi($this->api()) ->setDb($this->db())
->handleRequest()); ->setApi($this->api())
->handleRequest());
}
} }
$table->renderTo($this); $table->renderTo($this);