1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[pm-17804] Fix deferred execution issue in EF CreateManyAsync (#5425)

* Add failing repository tests

* test

* clean up comments

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
This commit is contained in:
Brandon Treston
2025-02-27 10:21:01 -05:00
committed by GitHub
parent 4c5bf495f3
commit 546b5a0849
2 changed files with 71 additions and 0 deletions

View File

@ -46,6 +46,7 @@ public class OrganizationUserRepository : Repository<Core.Entities.OrganizationU
public async Task<ICollection<Guid>> CreateManyAsync(IEnumerable<Core.Entities.OrganizationUser> organizationUsers)
{
organizationUsers = organizationUsers.ToList();
if (!organizationUsers.Any())
{
return new List<Guid>();