[backend/database] Fix heuristic query causing EF Core warnings

This commit is contained in:
Laura Hausmann 2024-07-10 00:50:49 +02:00
parent 0668c6b360
commit 10cc6232f3
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -44,7 +44,7 @@ public static class QueryableTimelineExtensions
return await db.Notes return await db.Notes
.Where(p => p.CreatedAt > latestNote.CreatedAt - TimeSpan.FromDays(7)) .Where(p => p.CreatedAt > latestNote.CreatedAt - TimeSpan.FromDays(7))
.FollowingAndOwnLowFreq(user, db) .FollowingAndOwnLowFreq(user, db)
//.Select(p => new { }) .OrderByDescending(p => p.Id)
.Take(Cutoff + 1) .Take(Cutoff + 1)
.CountAsync(); .CountAsync();
} }