fix(service): handle missing service database and redirect to configuration
This commit is contained in:
parent
360a82ec5d
commit
9466ad4a48
1 changed files with 7 additions and 0 deletions
|
|
@ -46,6 +46,13 @@ public function mount()
|
||||||
$this->serviceApplication->getFilesFromServer();
|
$this->serviceApplication->getFilesFromServer();
|
||||||
} else {
|
} else {
|
||||||
$this->serviceDatabase = $this->service->databases()->whereUuid($this->parameters['stack_service_uuid'])->first();
|
$this->serviceDatabase = $this->service->databases()->whereUuid($this->parameters['stack_service_uuid'])->first();
|
||||||
|
if (! $this->serviceDatabase) {
|
||||||
|
return redirect()->route('project.service.configuration', [
|
||||||
|
'project_uuid' => $this->parameters['project_uuid'],
|
||||||
|
'environment_uuid' => $this->parameters['environment_uuid'],
|
||||||
|
'service_uuid' => $this->parameters['service_uuid'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
$this->serviceDatabase->getFilesFromServer();
|
$this->serviceDatabase->getFilesFromServer();
|
||||||
}
|
}
|
||||||
$this->s3s = currentTeam()->s3s;
|
$this->s3s = currentTeam()->s3s;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue