always remove user from grouppairs during purge

This commit is contained in:
rootdarkarchon
2022-12-14 17:47:51 +01:00
parent a054ddaee0
commit c4cb52e698

View File

@@ -167,13 +167,11 @@ public class CleanupService : IHostedService, IDisposable
} }
else else
{ {
var groupHasMigrated = await SharedDbFunctions.MigrateOrDeleteGroup(dbContext, userGroupPair.Group, groupPairs, _configuration.GetValue<int>("MaxExistingGroupsByUser", 3)).ConfigureAwait(false); _ = await SharedDbFunctions.MigrateOrDeleteGroup(dbContext, userGroupPair.Group, groupPairs, _configuration.GetValue<int>("MaxExistingGroupsByUser", 3)).ConfigureAwait(false);
} }
} }
else
{ dbContext.GroupPairs.Remove(userGroupPair);
dbContext.GroupPairs.Remove(userGroupPair);
}
await dbContext.SaveChangesAsync(); await dbContext.SaveChangesAsync();
} }