Ignore delete groups

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2020-01-24 16:03:39 +01:00
parent 24e58947d6
commit 16f29d81bf
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with 77 additions and 73 deletions

View File

@ -52,14 +52,18 @@ OC.Settings = _.extend(OC.Settings, {
var groups = $(element).val(); var groups = $(element).val();
var selection; var selection;
if (groups && results.length > 0) { if (groups && results.length > 0) {
selection = _.map((groups || []).split('|').sort(), function(groupId) { selection = _.map(_.filter((groups || []).split('|').sort(), function(groupId) {
return results.find(function(group) {
return group.id === groupId
}) !== undefined
}), function(groupId) {
return { return {
id: groupId, id: groupId,
displayname: results.find(function (group) { displayname: results.find(function(group) {
return group.id === groupId; return group.id === groupId
}).displayname }).displayname
}; }
}); })
} else if (groups) { } else if (groups) {
selection = _.map((groups || []).split('|').sort(), function(groupId) { selection = _.map((groups || []).split('|').sort(), function(groupId) {
return { return {