fix(deployment): handle missing destination in deployment process to prevent errors

This commit is contained in:
Andras Bacsai
2025-04-14 13:58:27 +02:00
parent 9ae5ec0ed3
commit 06b8d78153

View File

@@ -1330,7 +1330,10 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
return;
}
foreach ($destination_ids as $destination_id) {
$destination = StandaloneDocker::find($destination_id)->first();
$destination = StandaloneDocker::find($destination_id);
if (! $destination) {
continue;
}
$server = $destination->server;
if ($server->team_id !== $this->mainServer->team_id) {
$this->application_deployment_queue->addLogEntry("Skipping deployment to {$server->name}. Not in the same team?!");