From 06b8d78153f3fe02cb5e84188c83f99d0a42f026 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:58:27 +0200 Subject: [PATCH] fix(deployment): handle missing destination in deployment process to prevent errors --- app/Jobs/ApplicationDeploymentJob.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 635032dfe..ab80a19de 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -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?!");