mhkadhum commented on code in PR #12124:
URL: https://github.com/apache/cloudstack/pull/12124#discussion_r2659513400
##########
ui/src/views/storage/UpdateBucket.vue:
##########
@@ -110,36 +132,31 @@ export default {
this.loading = true
Object.keys(this.apiParams).forEach(item => {
const field = this.apiParams[item]
- let fieldValue = null
- let fieldName = null
-
+ let fieldName = field.name
if (field.type === 'list' || field.name === 'account') {
fieldName = field.name.replace('ids', 'name').replace('id', 'name')
- } else {
- fieldName = field.name
}
- fieldValue = this.resource[fieldName] ? this.resource[fieldName] : null
- if (fieldValue) {
+ const fieldValue = this.resource[fieldName] ?? null
+ if (fieldValue !== null && fieldValue !== undefined) {
form[field.name] = fieldValue
}
})
this.loading = false
},
- handleSubmit (e) {
+ handleSubmit () {
if (this.loading) return
this.formRef.value.validate().then(() => {
- const formRaw = toRaw(this.form)
- const values = this.handleRemoveFields(formRaw)
-
- var data = {
+ const values = toRaw(this.form)
Review Comment:
This was removed by mistake during the refactoring. I’ve restored the
original handleRemoveFields.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]