Fix branch selection and handle missing service

This commit is contained in:
Andras Bacsai
2024-01-24 12:26:14 +01:00
parent 744609e7e9
commit 7d754558b0
3 changed files with 6 additions and 3 deletions

View File

@@ -30,7 +30,10 @@ class Configuration extends Component
{
$this->parameters = get_route_parameters();
$this->query = request()->query();
$this->service = Service::whereUuid($this->parameters['service_uuid'])->firstOrFail();
$this->service = Service::whereUuid($this->parameters['service_uuid'])->first();
if (!$this->service) {
return redirect()->route('dashboard');
}
$this->applications = $this->service->applications->sort();
$this->databases = $this->service->databases->sort();
}