1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-23 17:07:42 +01: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
{
if(groups == null || !org.UseGroups)
if(!org.UseGroups)
{
await _collectionRepository.ReplaceAsync(collection);
}
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
{
group.RevisionDate = DateTime.UtcNow;
if(collections == null)
{
await _groupRepository.ReplaceAsync(group);
}
else
{
await _groupRepository.ReplaceAsync(group, collections);
}
await _groupRepository.ReplaceAsync(group, collections ?? new List<SelectionReadOnly>());
}
}
}