Fix condition in removeServer method
This commit is contained in:
parent
fe19769d82
commit
f5cb2dbdcf
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ public function addServer(int $network_id, int $server_id)
|
||||||
}
|
}
|
||||||
public function removeServer(int $network_id, int $server_id)
|
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.');
|
$this->dispatch('error', 'You cannot remove this destination server.', 'You are trying to remove the main server.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue