update_vm_api: properly wrap arguments

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2023-07-19 12:22:04 +02:00
parent de5af2d3b2
commit b704d82578

View File

@ -1795,7 +1795,10 @@ my $update_vm_api = sub {
} elsif ($opt =~ m/^net\d+$/) {
if ($conf->{$opt}) {
PVE::QemuServer::check_bridge_access(
$rpcenv, $authuser, { $opt => $conf->{$opt} });
$rpcenv,
$authuser,
{ $opt => $conf->{$opt} },
);
}
PVE::QemuConfig->add_to_pending_delete($conf, $opt, $force);
PVE::QemuConfig->write_config($vmid, $conf);
@ -1870,7 +1873,10 @@ my $update_vm_api = sub {
} elsif ($opt =~ m/^net\d+$/) {
if ($conf->{$opt}) {
PVE::QemuServer::check_bridge_access(
$rpcenv, $authuser, { $opt => $conf->{$opt} });
$rpcenv,
$authuser,
{ $opt => $conf->{$opt} },
);
}
$conf->{pending}->{$opt} = $param->{$opt};
} else {