This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new 03f0f7a Defensive check (#578)
03f0f7a is described below
commit 03f0f7a5308b9cd483900d22e9c19a4512a1d806
Author: davidjumani <[email protected]>
AuthorDate: Thu Aug 13 14:18:03 2020 +0530
Defensive check (#578)
---
src/views/AutogenView.vue | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/views/AutogenView.vue b/src/views/AutogenView.vue
index fd6504c..0421ba4 100644
--- a/src/views/AutogenView.vue
+++ b/src/views/AutogenView.vue
@@ -748,11 +748,10 @@ export default {
if (res === 'count') {
continue
}
- const filter = this.currentAction.mapping[param.name].filter
- if (filter) {
+ param.opts = json[obj][res]
+ if (this.currentAction.mapping[param.name] &&
this.currentAction.mapping[param.name].filter) {
+ const filter = this.currentAction.mapping[param.name].filter
param.opts = json[obj][res].filter(filter)
- } else {
- param.opts = json[obj][res]
}
if (['listTemplates', 'listIsos'].includes(possibleApi)) {
param.opts = [...new Map(param.opts.map(x => [x.id,
x])).values()]
@@ -764,7 +763,7 @@ export default {
}
this.$forceUpdate()
}).catch(function (error) {
- console.log(error.stack)
+ console.log(error)
param.loading = false
}).then(function () {
})