IsEmpty Filter and other small fixes (#3142)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2024-09-13 15:15:01 -07:00 committed by GitHub
parent e574caf7eb
commit 07a36176de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
96 changed files with 1361 additions and 1135 deletions

View file

@ -69,7 +69,8 @@ public class StatisticService : IStatisticService
var totalPagesRead = await _context.AppUserProgresses
.Where(p => p.AppUserId == userId)
.Where(p => libraryIds.Contains(p.LibraryId))
.SumAsync(p => p.PagesRead);
.Select(p => (int?) p.PagesRead)
.SumAsync() ?? 0;
var timeSpentReading = await TimeSpentReadingForUsersAsync(new List<int>() {userId}, libraryIds);