Skip to content

Commit ebc8d40

Browse files
committed
Backup Rotation - Variable name changed
1 parent e6a4a17 commit ebc8d40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Services/Backups/InitiateBackupService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ public function handle(Server $server, string $name = null, bool $override = fal
123123
}
124124

125125
// Remove oldest backup
126-
$lastBackup = $server->backups()->where('is_successful', true)->orderByDesc('created_at')->first();
127-
$this->deleteBackupService->handle($lastBackup);
126+
$oldestBackup = $server->backups()->where('is_successful', true)->orderByDesc('created_at')->first();
127+
$this->deleteBackupService->handle($oldestBackup);
128128
}
129129

130130
return $this->connection->transaction(function () use ($server, $name) {

0 commit comments

Comments
 (0)