fix: scheduled database server
This commit is contained in:
parent
7872818f9e
commit
fd15c7b49e
1 changed files with 9 additions and 3 deletions
|
|
@ -39,13 +39,19 @@ public function get_last_days_backup_status($days = 7)
|
|||
public function server()
|
||||
{
|
||||
if ($this->database) {
|
||||
if ($this->database->destination && $this->database->destination->server) {
|
||||
$server = $this->database->destination->server;
|
||||
|
||||
if ($this->database instanceof ServiceDatabase) {
|
||||
$destination = data_get($this->database->service, 'destination');
|
||||
$server = data_get($destination, 'server');
|
||||
} else {
|
||||
$destination = data_get($this->database, 'destination');
|
||||
$server = data_get($destination, 'server');
|
||||
}
|
||||
if ($server) {
|
||||
return $server;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue