shwstppr commented on a change in pull request #441: URL: https://github.com/apache/cloudstack-primate/pull/441#discussion_r444655129
########## File path: src/views/AutogenView.vue ########## @@ -740,7 +740,8 @@ export default { this.currentAction.paramFields.map(field => { let fieldValue = null let fieldName = null - if (field.type === 'list' || field.name === 'account' || (this.currentAction.mapping && field.name in this.currentAction.mapping)) { + if (field.type === 'list' || field.name === 'account' || + (this.currentAction.mapping && field.name in this.currentAction.mapping && !(field.name in this.resource))) { Review comment: @rhtyd we already have a mapping for `oscategoryid` in `hosts.js` which is why we are seeing this problem. https://github.com/apache/cloudstack-primate/blob/master/src/config/section/infra/hosts.js#L63-L67 While prefilling current values of params in edit forms, code is replacing `oscategoryid` to `oscategoryname` and using the value for `oscategoryname` from the resource. IMO, it should not do this replacement just because we have a mapping for a param but since I'm not sure if removing it completely will break some case I just added an additional condition to stop this replacement when the original param (`oscategoryid` in `listHost` response) is available in the resource object. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org