diff --git a/app/Livewire/Project/Service/Index.php b/app/Livewire/Project/Service/Index.php index 8d37d3e31..50772101a 100644 --- a/app/Livewire/Project/Service/Index.php +++ b/app/Livewire/Project/Service/Index.php @@ -46,6 +46,13 @@ public function mount() $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;