mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: show error when user already exists in group
This commit is contained in:
parent
c3724bd2cb
commit
c9c083108a
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
loading: false,
|
loading: false,
|
||||||
limit: null,
|
limit: null,
|
||||||
|
@ -22,7 +24,7 @@ export default Ember.Controller.extend({
|
||||||
addMembers() {
|
addMembers() {
|
||||||
const usernames = this.get('usernames');
|
const usernames = this.get('usernames');
|
||||||
if (usernames && usernames.length > 0) {
|
if (usernames && usernames.length > 0) {
|
||||||
this.get('model').addMembers(usernames).then(() => this.set('usernames', []));
|
this.get('model').addMembers(usernames).then(() => this.set('usernames', [])).catch(popupAjaxError);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue