* [PATCH datacenter-manager] ui: auto-installer: parse empty string as 0 for new template counters
@ 2026-05-26 14:45 Dominik Csapak
2026-05-26 14:53 ` Lukas Wagner
2026-05-26 15:01 ` applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-05-26 14:45 UTC (permalink / raw)
To: pdm-devel
otherwise adding a new template counter will result in getting an error
message that "" is not a valid value even though 0 is entered.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/src/remotes/auto_installer/prepared_answer_form.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
index 255f36dd..431a713d 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
@@ -1075,6 +1075,7 @@ fn kv_list_to_template_counter_map_validate(v: &Vec<(String, Value)>) -> Result<
if TEMPLATE_COUNTER_NAME_REGEX.is_match(k) {
let value = match v {
Value::Number(number) => number.as_i64(),
+ Value::String(text) if text == "" => Some(0),
Value::String(text) => text.parse().ok(),
_ => None,
};
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH datacenter-manager] ui: auto-installer: parse empty string as 0 for new template counters
2026-05-26 14:45 [PATCH datacenter-manager] ui: auto-installer: parse empty string as 0 for new template counters Dominik Csapak
@ 2026-05-26 14:53 ` Lukas Wagner
2026-05-26 15:01 ` applied: " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Lukas Wagner @ 2026-05-26 14:53 UTC (permalink / raw)
To: Dominik Csapak, pdm-devel
On Tue May 26, 2026 at 4:45 PM CEST, Dominik Csapak wrote:
> otherwise adding a new template counter will result in getting an error
> message that "" is not a valid value even though 0 is entered.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> ui/src/remotes/auto_installer/prepared_answer_form.rs | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
> index 255f36dd..431a713d 100644
> --- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
> +++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
> @@ -1075,6 +1075,7 @@ fn kv_list_to_template_counter_map_validate(v: &Vec<(String, Value)>) -> Result<
> if TEMPLATE_COUNTER_NAME_REGEX.is_match(k) {
> let value = match v {
> Value::Number(number) => number.as_i64(),
> + Value::String(text) if text == "" => Some(0),
> Value::String(text) => text.parse().ok(),
> _ => None,
> };
Seems to fix the issue for me:
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* applied: [PATCH datacenter-manager] ui: auto-installer: parse empty string as 0 for new template counters
2026-05-26 14:45 [PATCH datacenter-manager] ui: auto-installer: parse empty string as 0 for new template counters Dominik Csapak
2026-05-26 14:53 ` Lukas Wagner
@ 2026-05-26 15:01 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-05-26 15:01 UTC (permalink / raw)
To: pdm-devel, Dominik Csapak
On Tue, 26 May 2026 16:45:31 +0200, Dominik Csapak wrote:
> otherwise adding a new template counter will result in getting an error
> message that "" is not a valid value even though 0 is entered.
Applied, thanks!
[1/1] ui: auto-installer: parse empty string as 0 for new template counters
commit: b7c4909b3bd1f5e5cc31fb67e7395e653897461b
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-26 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 14:45 [PATCH datacenter-manager] ui: auto-installer: parse empty string as 0 for new template counters Dominik Csapak
2026-05-26 14:53 ` Lukas Wagner
2026-05-26 15:01 ` applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.