From 0a0bb0ca1319be60eaf78bf863a45cbde9ec5100 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 24 May 2024 17:06:26 +0200 Subject: [PATCH] fix: sentry --- app/Livewire/Project/Database/BackupExecutions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Project/Database/BackupExecutions.php b/app/Livewire/Project/Database/BackupExecutions.php index 18ec9cd96..5e9319cfd 100644 --- a/app/Livewire/Project/Database/BackupExecutions.php +++ b/app/Livewire/Project/Database/BackupExecutions.php @@ -22,7 +22,7 @@ public function getListeners() public function cleanupFailed() { if ($this->backup) { - $this->backup?->executions()->where('status', 'failed')->delete(); + $this->backup->executions()->where('status', 'failed')->delete(); $this->refreshBackupExecutions(); $this->dispatch('success', 'Failed backups cleaned up.'); } @@ -49,6 +49,8 @@ public function download_file($exeuctionId) } public function refreshBackupExecutions(): void { - $this->executions = $this->backup?->executions()->get()->sortByDesc('created_at'); + if ($this->backup) { + $this->executions = $this->backup->executions()->get()->sortByDesc('created_at'); + } } }