mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +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 expiredDomains = await dbContext.OrganizationDomains
|
||||
.Where(x => x.LastCheckedDate < DateTime.UtcNow.AddDays(-expirationPeriod))
|
||||
.Where(x => x.LastCheckedDate < DateTime.UtcNow.AddDays(-expirationPeriod) && x.VerifiedDate == null)
|
||||
.ToListAsync();
|
||||
dbContext.OrganizationDomains.RemoveRange(expiredDomains);
|
||||
return await dbContext.SaveChangesAsync() > 0;
|
||||
|
||||
Reference in New Issue
Block a user