mirror of https://github.com/apache/cloudstack.git
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>
This commit is contained in:
parent
8ed5a4fae6
commit
6540d9965b
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue