diff --git a/src/NzbDrone.Core/History/HistoryRepository.cs b/src/NzbDrone.Core/History/HistoryRepository.cs index 28e704837..646611097 100644 --- a/src/NzbDrone.Core/History/HistoryRepository.cs +++ b/src/NzbDrone.Core/History/HistoryRepository.cs @@ -116,6 +116,7 @@ namespace NzbDrone.Core.History { var builder = Builder() .Join((h, a) => h.AuthorId == a.Id) + .LeftJoin((h, b) => h.BookId == b.Id) .Where(x => x.Date >= date); if (eventType.HasValue) @@ -123,9 +124,10 @@ namespace NzbDrone.Core.History builder.Where(h => h.EventType == eventType); } - return _database.QueryJoined(builder, (history, author) => + return _database.QueryJoined(builder, (history, author, book) => { history.Author = author; + history.Book = book; return history; }).OrderBy(h => h.Date).ToList(); }