diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs index 561a2249263..a05e59a1d04 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs @@ -152,11 +152,10 @@ public virtual async Task RemoveClaimFromAllUsersAsync(string claimType, bool au if (userClaims.Any()) { (await GetDbContextAsync()).Set().RemoveRange(userClaims); - } - - if (autoSave) - { - await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); + if (autoSave) + { + await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); + } } }