mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-13 06:43:16 +00:00
null check on users
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Bit.Core.Services
|
|||||||
List<GroupEntry> groups = null;
|
List<GroupEntry> groups = null;
|
||||||
if(SettingsService.Instance.Sync.SyncGroups)
|
if(SettingsService.Instance.Sync.SyncGroups)
|
||||||
{
|
{
|
||||||
groups = await GetGroupsAsync(force || users.Any(u => !u.Deleted && !u.Disabled));
|
groups = await GetGroupsAsync(force || (users?.Any(u => !u.Deleted && !u.Disabled) ?? false));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Tuple<List<GroupEntry>, List<UserEntry>>(groups, users);
|
return new Tuple<List<GroupEntry>, List<UserEntry>>(groups, users);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace Bit.Core.Services
|
|||||||
List<GroupEntry> groups = null;
|
List<GroupEntry> groups = null;
|
||||||
if(SettingsService.Instance.Sync.SyncGroups)
|
if(SettingsService.Instance.Sync.SyncGroups)
|
||||||
{
|
{
|
||||||
groups = await GetGroupsAsync(force || users.Any(u => !u.Deleted && !u.Disabled));
|
groups = await GetGroupsAsync(force || (users?.Any(u => !u.Deleted && !u.Disabled) ?? false));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Tuple<List<GroupEntry>, List<UserEntry>>(groups, users);
|
return new Tuple<List<GroupEntry>, List<UserEntry>>(groups, users);
|
||||||
|
|||||||
Reference in New Issue
Block a user