1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-08 14:38:15 -05:00

always update associations on group/coll updates

This commit is contained in:
Kyle Spearrin 2017-11-24 11:53:15 -05:00
parent 0502ba2451
commit 49372bed38
2 changed files with 3 additions and 11 deletions

View File

@ -61,13 +61,13 @@ namespace Bit.Core.Services
} }
else else
{ {
if(groups == null || !org.UseGroups) if(!org.UseGroups)
{ {
await _collectionRepository.ReplaceAsync(collection); await _collectionRepository.ReplaceAsync(collection);
} }
else else
{ {
await _collectionRepository.ReplaceAsync(collection, groups); await _collectionRepository.ReplaceAsync(collection, groups ?? new List<SelectionReadOnly>());
} }
} }
} }

View File

@ -50,15 +50,7 @@ namespace Bit.Core.Services
else else
{ {
group.RevisionDate = DateTime.UtcNow; group.RevisionDate = DateTime.UtcNow;
await _groupRepository.ReplaceAsync(group, collections ?? new List<SelectionReadOnly>());
if(collections == null)
{
await _groupRepository.ReplaceAsync(group);
}
else
{
await _groupRepository.ReplaceAsync(group, collections);
}
} }
} }
} }