diff --git a/app/Livewire/Project/Database/BackupEdit.php b/app/Livewire/Project/Database/BackupEdit.php index f5f476257..d7f7f5503 100644 --- a/app/Livewire/Project/Database/BackupEdit.php +++ b/app/Livewire/Project/Database/BackupEdit.php @@ -35,7 +35,7 @@ class BackupEdit extends Component public function mount() { $this->parameters = get_route_parameters(); - if (is_null($this->backup->s3_storage_id)) { + if (is_null(data_get($this->backup, 's3_storage_id'))) { $this->backup->s3_storage_id = 'default'; } } diff --git a/app/Livewire/Project/Database/BackupExecutions.php b/app/Livewire/Project/Database/BackupExecutions.php index a34d849f2..101bb4593 100644 --- a/app/Livewire/Project/Database/BackupExecutions.php +++ b/app/Livewire/Project/Database/BackupExecutions.php @@ -20,7 +20,7 @@ class BackupExecutions extends Component public function cleanupFailed() { - $this->backup->executions()->where('status', 'failed')->delete(); + $this->backup?->executions()->where('status', 'failed')->delete(); $this->refreshBackupExecutions(); } public function deleteBackup($exeuctionId)