We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7872818 commit fd15c7bCopy full SHA for fd15c7b
app/Models/ScheduledDatabaseBackup.php
@@ -39,13 +39,19 @@ public function get_last_days_backup_status($days = 7)
39
public function server()
40
{
41
if ($this->database) {
42
- if ($this->database->destination && $this->database->destination->server) {
43
- $server = $this->database->destination->server;
44
-
+ if ($this->database instanceof ServiceDatabase) {
+ $destination = data_get($this->database->service, 'destination');
+ $server = data_get($destination, 'server');
45
+ } else {
46
+ $destination = data_get($this->database, 'destination');
47
48
+ }
49
+ if ($server) {
50
return $server;
51
}
52
53
54
+
55
return null;
56
57
0 commit comments