Merge pull request #3146 from loganhz/role

Fix adding role issue
This commit is contained in:
Westly Wright 2019-07-22 09:42:11 -07:00 committed by GitHub
commit d172ba4799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -242,6 +242,11 @@ export default Component.extend(NewOrEdit, {
},
set(key, value) {
if (typeof value === 'object') {
const ur = get(this, 'userRoles').findBy('active', true);
if ( ur ) {
set(ur, 'active', false);
}
set(value, 'active', true);
// value = get(value, 'role.id');
// return get(value, 'role.id');