Skip to content

Commit 6540d99

Browse files
authored
ui: submit form with false boolean params (#5224)
Skip only empty strings while submitting UI form. Fixes #5223 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 8ed5a4f commit 6540d99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/src/views/AutogenView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,15 +995,15 @@ export default {
995995
if (param.name !== key) {
996996
continue
997997
}
998-
if (!input === undefined || input === null ||
998+
if (input === undefined || input === null ||
999999
(input === '' && !['updateStoragePool', 'updateHost', 'updatePhysicalNetwork', 'updateDiskOffering', 'updateNetworkOffering'].includes(action.api))) {
10001000
if (param.type === 'boolean') {
10011001
params[key] = false
10021002
}
10031003
break
10041004
}
1005-
if (!input && input !== 0 && !['tags'].includes(key)) {
1006-
continue
1005+
if (input === '' && !['tags'].includes(key)) {
1006+
break
10071007
}
10081008
if (action.mapping && key in action.mapping && action.mapping[key].options) {
10091009
params[key] = action.mapping[key].options[input]

0 commit comments

Comments
 (0)