fix(clone): update destinations method call to ensure correct retrieval of selected destination

This commit is contained in:
Andras Bacsai
2025-09-18 13:44:56 +02:00
parent c1799bdae6
commit 074c70c8ab

View File

@@ -127,7 +127,7 @@ class CloneMe extends Component
$databases = $this->environment->databases();
$services = $this->environment->services;
foreach ($applications as $application) {
$selectedDestination = $this->servers->flatMap(fn ($server) => $server->destinations)->where('id', $this->selectedDestination)->first();
$selectedDestination = $this->servers->flatMap(fn ($server) => $server->destinations())->where('id', $this->selectedDestination)->first();
clone_application($application, $selectedDestination, [
'environment_id' => $environment->id,
], $this->cloneVolumeData);