Skip to content

Commit 6fb88ed

Browse files
committed
fix: scheduledbackup not found
1 parent 58c6d06 commit 6fb88ed

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/Livewire/SettingsBackup.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,15 @@ public function mount()
5454
}
5555
$this->settings = $settings;
5656
$this->s3s = $s3s;
57-
$this->backup = $this->database?->scheduledBackups?->first() ?? null;
58-
$this->executions = $this->backup?->executions ?? [];
57+
58+
$scheduledBackups = data_get($this->database, 'scheduledBackups');
59+
if ($scheduledBackups) {
60+
$this->backup = $scheduledBackups->first();
61+
}
62+
$executions = data_get($this->backup, 'executions');
63+
if ($executions) {
64+
$this->executions = $executions;
65+
}
5966
} else {
6067
return redirect()->route('dashboard');
6168
}

0 commit comments

Comments
 (0)