fix: scheduled database server
This commit is contained in:
@@ -39,13 +39,19 @@ class ScheduledDatabaseBackup extends BaseModel
|
|||||||
public function server()
|
public function server()
|
||||||
{
|
{
|
||||||
if ($this->database) {
|
if ($this->database) {
|
||||||
if ($this->database->destination && $this->database->destination->server) {
|
if ($this->database instanceof ServiceDatabase) {
|
||||||
$server = $this->database->destination->server;
|
$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 $server;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user