]> git.proxmox.com Git - qemu-server.git/commitdiff
config: ensure that tags are unique
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Nov 2022 07:19:33 +0000 (08:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Nov 2022 07:19:33 +0000 (08:19 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Qemu.pm

index b0c40fa5f71438ce2868fc4ece73fbf15219ae2c..98ac63f7fb6630d66d8899e89d9a7b4dbc5ee67f 100644 (file)
@@ -1768,7 +1768,7 @@ my $update_vm_api  = sub {
                    $conf->{pending}->{$opt} = $param->{$opt};
                } elsif ($opt eq 'tags') {
                    assert_tag_permissions($vmid, $conf->{$opt}, $param->{$opt}, $rpcenv, $authuser);
-                   $conf->{pending}->{$opt} = $param->{$opt};
+                   $conf->{pending}->{$opt} = PVE::GuestHelpers::get_unique_tags($param->{$opt});
                } else {
                    $conf->{pending}->{$opt} = $param->{$opt};