fixed "currently reading" book filter to remove read books

This commit is contained in:
2026-03-06 17:17:53 +01:00
parent 28e86e5032
commit e8e2df3c43
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ func fetchReadUserBookQuery(db *gorm.DB, userId uint) *gorm.DB {
}
func fetchReadingUserBookQuery(db *gorm.DB, userId uint) *gorm.DB {
query := fetchUserBookGet(db, userId)
query = query.Where("user_books.start_read_date IS NOT NULL")
query = query.Where("user_books.start_read_date IS NOT NULL AND (user_books.read IS NULL OR user_books.read IS FALSE)")
return query
}