From 51db2f797d1942b636adc3a72402b2268db69572 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 20 Dec 2023 16:19:48 +0100 Subject: [PATCH] fix: storage error on dbs --- app/Livewire/Project/Shared/Storages/Add.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/Livewire/Project/Shared/Storages/Add.php b/app/Livewire/Project/Shared/Storages/Add.php index e2e84c358..2bfbf7baf 100644 --- a/app/Livewire/Project/Shared/Storages/Add.php +++ b/app/Livewire/Project/Shared/Storages/Add.php @@ -31,14 +31,16 @@ class Add extends Component public function mount() { $this->parameters = get_route_parameters(); - $applicationUuid = $this->parameters['application_uuid']; - $application = Application::where('uuid', $applicationUuid)->first(); - if (!$application) { - abort(404); - } - if ($application->destination->server->isSwarm()) { - $this->isSwarm = true; - $this->rules['host_path'] = 'required|string'; + if (data_get($this->parameters, 'application_uuid')) { + $applicationUuid = $this->parameters['application_uuid']; + $application = Application::where('uuid', $applicationUuid)->first(); + if (!$application) { + abort(404); + } + if ($application->destination->server->isSwarm()) { + $this->isSwarm = true; + $this->rules['host_path'] = 'required|string'; + } } }