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:
parent
0502ba2451
commit
49372bed38
@ -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>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user