From f5cb2dbdcf8cabc2ac8f767daf50ae4172462e42 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 15 Feb 2024 21:25:43 +0100 Subject: [PATCH] Fix condition in removeServer method --- app/Livewire/Project/Shared/Destination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Livewire/Project/Shared/Destination.php b/app/Livewire/Project/Shared/Destination.php index 6b51157bf..6981886bf 100644 --- a/app/Livewire/Project/Shared/Destination.php +++ b/app/Livewire/Project/Shared/Destination.php @@ -73,7 +73,7 @@ class Destination extends Component } public function removeServer(int $network_id, int $server_id) { - if ($this->resource->destination->server->id == $server_id) { + if ($this->resource->destination->server->id == $server_id && $this->resource->destination->id == $network_id) { $this->dispatch('error', 'You cannot remove this destination server.', 'You are trying to remove the main server.'); return; }