Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(service): handle missing service database and redirect to configuration

Andras Bacsai9466ad4a489a
diff --git a/app/Livewire/Project/Service/Index.php b/app/Livewire/Project/Service/Index.php
index 8d37d3e31f..50772101a9 100644
--- a/app/Livewire/Project/Service/Index.php
+++ b/app/Livewire/Project/Service/Index.php
@@ -46,6 +46,13 @@ class Index extends Component
$this->serviceApplication->getFilesFromServer();
} else {
$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->s3s = currentTeam()->s3s;