Merge pull request #3215 from bohdan-shulha/patch-1
Avoid crash if the team is not set
This commit is contained in:
commit
d0ce31c9e0
1 changed files with 3 additions and 2 deletions
|
|
@ -91,8 +91,6 @@ public function uniqueId(): int
|
|||
public function handle(): void
|
||||
{
|
||||
try {
|
||||
BackupCreated::dispatch($this->team->id);
|
||||
|
||||
// Check if team is exists
|
||||
if (is_null($this->team)) {
|
||||
$this->backup->update(['status' => 'failed']);
|
||||
|
|
@ -101,6 +99,9 @@ public function handle(): void
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
BackupCreated::dispatch($this->team->id);
|
||||
|
||||
$status = str(data_get($this->database, 'status'));
|
||||
if (! $status->startsWith('running') && $this->database->id !== 0) {
|
||||
ray('database not running');
|
||||
|
|
|
|||
Loading…
Reference in a new issue