mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
[pm-5966] Fix Entity Framework query for MySQL (#5170)
Problem: The Entity Framework query was causing a compile-time error. Changes: 1. Fixed the query. 2. Renamed the variable to replace the comment.
This commit is contained in:
@ -147,14 +147,13 @@ public class OrganizationDomainRepository : Repository<Core.Entities.Organizatio
|
||||
using var scope = ServiceScopeFactory.CreateScope();
|
||||
var dbContext = GetDatabaseContext(scope);
|
||||
|
||||
//Get domains that have not been verified after 72 hours
|
||||
var domains = await dbContext.OrganizationDomains
|
||||
.Where(x => (DateTime.UtcNow - x.CreationDate).Days == 4
|
||||
&& x.VerifiedDate == null)
|
||||
var threeDaysOldUnverifiedDomains = await dbContext.OrganizationDomains
|
||||
.Where(x => x.CreationDate.Date == DateTime.UtcNow.AddDays(-4).Date
|
||||
&& x.VerifiedDate == null)
|
||||
.AsNoTracking()
|
||||
.ToListAsync();
|
||||
|
||||
return Mapper.Map<List<Core.Entities.OrganizationDomain>>(domains);
|
||||
return Mapper.Map<List<Core.Entities.OrganizationDomain>>(threeDaysOldUnverifiedDomains);
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteExpiredAsync(int expirationPeriod)
|
||||
|
Reference in New Issue
Block a user