When removing a group response.data.action becomes 'remove', thus the if
shows an empty notification.
This commit is contained in:
kondou 2013-04-05 18:52:14 +02:00
parent 5525fade11
commit 8d63b7d9bf
1 changed files with 2 additions and 2 deletions

View File

@ -218,8 +218,8 @@ var UserList = {
group: group
},
function (response) {
if(response.status === 'success' && response.data.action === 'add') {
if(UserList.availableGroups.indexOf(response.data.gropname) === -1) {
if(response.status === 'success') {
if(UserList.availableGroups.indexOf(response.data.gropname) === -1 && response.data.action === 'add') {
UserList.availableGroups.push(response.data.gropname);
}
} else {