This is an automated email from the ASF dual-hosted git repository.
chenxingchun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 1a3fcc2 [Fix-4648][UI] Fix TypeError: Cannot read property 'id' of
undefined in createUser
new 8419ad7 Merge pull request #4649 from chengshiwen/fix-create-user
1a3fcc2 is described below
commit 1a3fcc2e0a99c6e6d6a46ae6c8dfa1a16817a308
Author: chengshiwen <[email protected]>
AuthorDate: Mon Feb 1 19:29:12 2021 +0800
[Fix-4648][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 1ff5550..882a54c 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
@@ -239,7 +239,9 @@
}
})
this.$nextTick(() => {
- this.tenantId = this.tenantList[0].id
+ if (this.tenantList.length) {
+ this.tenantId = this.tenantList[0].id
+ }
})
resolve()
})
@@ -291,9 +293,14 @@
this.email = this.item.email
this.phone = this.item.phone
this.userState = this.item.state + '' || '1'
- 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 || ''
+ }
})
}
})
@@ -304,9 +311,14 @@
this.email = this.item.email
this.phone = this.item.phone
this.userState = this.state + '' || '1'
- 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 = ''
}