mirror of
https://github.com/bitwarden/server
synced 2025-12-10 13:23:27 +00:00
[PM-15354] fix EF implementation to match dapper (missing null check) (#6261)
* fix EF implementation to match dapper (missing null check) * cleanup
This commit is contained in:
@@ -152,7 +152,7 @@ public class OrganizationDomainRepository : Repository<Core.Entities.Organizatio
|
|||||||
var dbContext = GetDatabaseContext(scope);
|
var dbContext = GetDatabaseContext(scope);
|
||||||
|
|
||||||
var expiredDomains = await dbContext.OrganizationDomains
|
var expiredDomains = await dbContext.OrganizationDomains
|
||||||
.Where(x => x.LastCheckedDate < DateTime.UtcNow.AddDays(-expirationPeriod))
|
.Where(x => x.LastCheckedDate < DateTime.UtcNow.AddDays(-expirationPeriod) && x.VerifiedDate == null)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
dbContext.OrganizationDomains.RemoveRange(expiredDomains);
|
dbContext.OrganizationDomains.RemoveRange(expiredDomains);
|
||||||
return await dbContext.SaveChangesAsync() > 0;
|
return await dbContext.SaveChangesAsync() > 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user