From 102dd6bfb1f62b257cc9d043332c33bf1d08afb0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 26 Jul 2024 20:07:39 +0200 Subject: [PATCH] fix: activity type invalid --- app/Livewire/Project/Service/Navbar.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.php index 7d3987b3d..f2fd5ae96 100644 --- a/app/Livewire/Project/Service/Navbar.php +++ b/app/Livewire/Project/Service/Navbar.php @@ -62,11 +62,15 @@ class Navbar extends Component public function checkDeployments() { - $activity = Activity::where('properties->type_uuid', $this->service->uuid)->latest()->first(); - $status = data_get($activity, 'properties.status'); - if ($status === 'queued' || $status === 'in_progress') { - $this->isDeploymentProgress = true; - } else { + try { + $activity = Activity::where('properties->type_uuid', $this->service->uuid)->latest()->first(); + $status = data_get($activity, 'properties.status'); + if ($status === 'queued' || $status === 'in_progress') { + $this->isDeploymentProgress = true; + } else { + $this->isDeploymentProgress = false; + } + } catch (\Exception $e) { $this->isDeploymentProgress = false; } }