fix: do not add the same server twice

This commit is contained in:
Andras Bacsai 2024-02-15 21:22:59 +01:00
parent 45e404b15b
commit fe19769d82

View File

@ -37,6 +37,9 @@ class Destination extends Component
$this->networks = $this->networks->reject(function ($network) use ($all_networks) {
return $all_networks->pluck('id')->contains($network->id);
});
$this->networks = $this->networks->reject(function ($network) {
return $this->resource->destination->server->id == $network->server->id;
});
}
public function redeploy(int $network_id, int $server_id)
{