Refactor BackupExecutions.php to use optional chaining for deleting failed backup executions
This commit is contained in:
parent
b0b7842f9c
commit
bb451ac3b5
@ -20,7 +20,7 @@ class BackupExecutions extends Component
|
|||||||
|
|
||||||
public function cleanupFailed()
|
public function cleanupFailed()
|
||||||
{
|
{
|
||||||
$this->backup->executions()->where('status', 'failed')->delete();
|
$this->backup?->executions()->where('status', 'failed')->delete();
|
||||||
$this->refreshBackupExecutions();
|
$this->refreshBackupExecutions();
|
||||||
}
|
}
|
||||||
public function deleteBackup($exeuctionId)
|
public function deleteBackup($exeuctionId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user