mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
FIX: saving invisible primary group field that you don't belong to
This commit is contained in:
@ -71,7 +71,12 @@ const AdminUser = Discourse.User.extend({
|
||||
groupRemoved(groupId) {
|
||||
return ajax("/admin/users/" + this.get('id') + "/groups/" + groupId, {
|
||||
type: 'DELETE'
|
||||
}).then(() => this.set('groups.[]', this.get('groups').rejectBy("id", groupId)));
|
||||
}).then(() => {
|
||||
this.set('groups.[]', this.get('groups').rejectBy("id", groupId));
|
||||
if (this.get('primary_group_id') === groupId) {
|
||||
this.set('primary_group_id', null);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
revokeApiKey() {
|
||||
|
Reference in New Issue
Block a user