This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch 1.3.5-prepare
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/1.3.5-prepare by this push:
new af056a1 [cherry-pick-4649][UI] Fix TypeError: Cannot read property
'id' of undefined in createUser (#4659)
af056a1 is described below
commit af056a1475b84bdbed8a51188ad08fd33c6d695a
Author: break60 <[email protected]>
AuthorDate: Tue Feb 2 16:17:59 2021 +0800
[cherry-pick-4649][UI] Fix TypeError: Cannot read property 'id' of
undefined in createUser (#4659)
* [cherry-pick-4649][UI] Fix TypeError: Cannot read property 'id' of
undefined in createUser
---
.../security/pages/users/_source/createUser.vue | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
index 3850f6e..68e3bcd 100644
---
a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
@@ -226,7 +226,9 @@
}
})
this.$nextTick(() => {
- this.tenantId = this.tenantList[0].id
+ if (this.tenantList.length) {
+ this.tenantId = this.tenantList[0].id
+ }
})
resolve()
})
@@ -275,9 +277,14 @@
this.userPassword = ''
this.email = this.item.email
this.phone = this.item.phone
- this.tenantId = this.item.tenantId
+ if (this.item.tenantName) {
+ this.tenantId = this.item.tenantId
+ }
this.$nextTick(() => {
- this.queueName = _.find(this.queueList, ['code',
this.item.queue]).id||''
+ let queue = _.find(this.queueList, ['code', this.item.queue])
+ if (queue) {
+ this.queueName = queue.id || ''
+ }
})
}
})
@@ -287,9 +294,14 @@
this.userPassword = ''
this.email = this.item.email
this.phone = this.item.phone
- this.tenantId = this.item.tenantId
+ if (this.item.tenantName) {
+ this.tenantId = this.item.tenantId
+ }
if(this.queueList.length>0) {
- this.queueName = _.find(this.queueList, ['code',
this.item.queue]).id
+ let queue = _.find(this.queueList, ['code', this.item.queue])
+ if (queue) {
+ this.queueName = queue.id || ''
+ }
} else {
this.queueName = ''
}