mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Null org, org user ids, and friendly name to indicate invalid, unused sponsorship state (#1738)
* Null org, org user ids, and friendly name to indicate invalid, unused sponsorship state * Match EF queries to MSSQL sprocs
This commit is contained in:
@ -113,6 +113,7 @@ namespace Bit.Core.Repositories.EntityFramework
|
||||
{
|
||||
sponsorship.SponsoredOrganizationId = UpdatedOrgId(sponsorship.SponsoredOrganizationId);
|
||||
sponsorship.SponsoringOrganizationId = UpdatedOrgId(sponsorship.SponsoringOrganizationId);
|
||||
sponsorship.FriendlyName = null;
|
||||
}
|
||||
|
||||
dbContext.Remove(orgEntity);
|
||||
|
@ -80,6 +80,7 @@ namespace Bit.Core.Repositories.EntityFramework
|
||||
foreach (var sponsorship in sponsorships)
|
||||
{
|
||||
sponsorship.SponsoringOrganizationUserId = null;
|
||||
sponsorship.FriendlyName = null;
|
||||
}
|
||||
|
||||
dbContext.Remove(orgUser);
|
||||
@ -99,6 +100,7 @@ namespace Bit.Core.Repositories.EntityFramework
|
||||
foreach (var sponsorship in sponsorships)
|
||||
{
|
||||
sponsorship.SponsoringOrganizationUserId = null;
|
||||
sponsorship.FriendlyName = null;
|
||||
}
|
||||
|
||||
dbContext.RemoveRange(entities);
|
||||
|
Reference in New Issue
Block a user