From e2b522c2f7764afb68d376d5756a24b06196d302 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 20 Jul 2021 15:59:14 +0530 Subject: [PATCH] ui: submit form with false boolean params Skip only empty strings while submitting UI form. Fixes #5223 Signed-off-by: Abhishek Kumar --- ui/src/views/AutogenView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index f274ecf54443..73fff05f03ea 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -995,15 +995,15 @@ export default { if (param.name !== key) { continue } - if (!input === undefined || input === null || + if (input === undefined || input === null || (input === '' && !['updateStoragePool', 'updateHost', 'updatePhysicalNetwork', 'updateDiskOffering', 'updateNetworkOffering'].includes(action.api))) { if (param.type === 'boolean') { params[key] = false } break } - if (!input && input !== 0 && !['tags'].includes(key)) { - continue + if (input === '' && !['tags'].includes(key)) { + break } if (action.mapping && key in action.mapping && action.mapping[key].options) { params[key] = action.mapping[key].options[input]