From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 93B721FF0E1 for ; Mon, 16 Nov 2026 02:01:53 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1F486217F2; Mon, 16 Nov 2026 02:01:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794790856; x=1795395656; darn=lists.proxmox.com; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=9pusF8PgnChfgyaaaj7C7KB0I988Hai1cSpKu3l+15U=; b=HZDoqslI2Ld6NCd7zsVR1bvjABZiVpXGt14eCe4+SOgkAIABVtNvYZuoGUq8TRVGTr b8eOHOoJkuecu8DhXEg/vFRNaRmtobieywi/ztYrsQbd4xBXRo4PArhHBVnsewsVBvd5 AXWfIeRaJLrQaMdwNOphvRXRnpa7u9bvzCaXaXeyYFJiOwmOWN1z/Xy/4J2T/lNQHEbI 6Cc1f8oMGtSAkEkgTjvuBbIPe6AUHMG7PMgjze3YDblyxlF9u14WSOcB/IT6QjJTF6Ke DvgyalfgumYl27k6WeKCuBtmTBAV601PhgHUhLv7ECAB+cU06BY6romnSZJOqv6umBNm qw0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794790856; x=1795395656; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9pusF8PgnChfgyaaaj7C7KB0I988Hai1cSpKu3l+15U=; b=NIEX70rKO5cPhqOYEibkgS0wQGzb4/n31BFWDd+9JrCtaz1er4pfdioCCztnaxt8r9 tAypBvGpAV7dRv+rRzsk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ZtoEm4RjF0VvhER0qrFAc7OhEWFZJMDNte3bduZkJ/37KWmPBw== X-Received: by 2002:a05:6102:374a:b0:7cc:32ce:4c51 with SMTP id ada2fe7eead31-7d64d709e8fmr2437755137.8.1794790856282; Sun, 15 Nov 2026 17:00:56 -0800 (PST) From: Lucas Barros To: pve-devel@lists.proxmox.com Subject: [PATCH manager v2 5/5] fix #7173: ui: guest: delete tags when removing the last tag Date: Sun, 15 Nov 2026 22:00:40 -0300 Message-ID: <20261116010040.90964-6-lucasbarros.kam@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261116010040.90964-1-lucasbarros.kam@gmail.com> References: <1794390075.ol4qipttrq.astroid@yuna.none> <20261116010040.90964-1-lucasbarros.kam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.054 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: CBYSM6Z3ZMLD6DGWFOUY2ZL72H24XZSV X-Message-ID-Hash: CBYSM6Z3ZMLD6DGWFOUY2ZL72H24XZSV X-MailFrom: lucasbarros.kam@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Lucas Barros X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Removing the last tag of a guest in the tag editor of the guest panel sends an empty 'tags' value, which is stored as an empty 'tags:' line in the guest config. Delete the option instead when no tag is left, which is what the removal of the last tag means and also works with backends that do not turn an empty tag list into a deletion themselves. Suggested-by: Fabian Grünbichler Signed-off-by: Lucas Barros --- changes since v1: * new patch Works on its own against nodes without patches 1/5 and 3/5, as deleting 'tags' was always possible. This patch was prepared with the help of an LLM based coding assistant; I reviewed the change and ran the tests mentioned in the cover letter myself. www/manager6/lxc/Config.js | 4 +--- www/manager6/qemu/Config.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js index 3a99d6a7..536ea557 100644 --- a/www/manager6/lxc/Config.js +++ b/www/manager6/lxc/Config.js @@ -208,9 +208,7 @@ Ext.define('PVE.lxc.Config', { Proxmox.Utils.API2Request({ url: base_url + '/config', method: 'PUT', - params: { - tags, - }, + params: tags ? { tags } : { delete: 'tags' }, success: function () { me.statusStore.load(); }, diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js index 842d35de..85a5e78e 100644 --- a/www/manager6/qemu/Config.js +++ b/www/manager6/qemu/Config.js @@ -255,9 +255,7 @@ Ext.define('PVE.qemu.Config', { Proxmox.Utils.API2Request({ url: base_url + '/config', method: 'PUT', - params: { - tags, - }, + params: tags ? { tags } : { delete: 'tags' }, success: function () { me.statusStore.load(); }, -- 2.50.1 (Apple Git-155)