Refactor BackupExecutions.php to use optional chaining for deleting failed backup executions

This commit is contained in:
Andras Bacsai 2024-05-17 13:43:36 +02:00
parent b0b7842f9c
commit bb451ac3b5

View File

@ -20,7 +20,7 @@ public function getListeners()
public function cleanupFailed()
{
$this->backup->executions()->where('status', 'failed')->delete();
$this->backup?->executions()->where('status', 'failed')->delete();
$this->refreshBackupExecutions();
}
public function deleteBackup($exeuctionId)