diff --git a/settings/js/users.js b/settings/js/users.js index d79b21765f..14d0a966d4 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -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 {