From 0e4e21112335883c790a624ffefd48f06ba667f0 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 21 Aug 2020 16:15:06 +0200 Subject: [PATCH] Use role selection response for setting role Previously we were fetching the role assignments again. Not necessary, as the request for setting a role already returns the resulting assignment object as a response. --- ui/components/accounts/AccountsListRow.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/components/accounts/AccountsListRow.vue b/ui/components/accounts/AccountsListRow.vue index 3db2265b87..2b05312f22 100644 --- a/ui/components/accounts/AccountsListRow.vue +++ b/ui/components/accounts/AccountsListRow.vue @@ -95,7 +95,10 @@ export default { }) if (response.status === 201) { - this.getUsersCurrentRole() + const roleId = response.data.assignment.roleId + this.currentRole = this.roles.find(role => { + return role.id === roleId + }) } else { this.showMessage({ title: this.$gettext('Failed to change role.'),