Skip to content

Commit

Permalink
fix: remove state used
Browse files Browse the repository at this point in the history
  • Loading branch information
pksorensen committed Nov 12, 2024
1 parent ed0ab48 commit f0bbea2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.JsonWebTokens;
Expand Down Expand Up @@ -211,7 +212,8 @@ private async Task SyncUserGroup(ClaimsPrincipal identity, List<Guid> groupIds,
groupsDict[(Guid) sgm.SecurityGroupId].EntraIdGroupId != null); // Groups of higher aurthority has no EntraGroupId and should not be removed
foreach (var sgm in expiredGroupMembers)
{
db.Remove(sgm);
db.Entry(sgm).State = EntityState.Deleted;
// db.Remove(sgm);
isDirty = true;
}

Expand Down

0 comments on commit f0bbea2

Please sign in to comment.