From b3aeeeef09087aa98f1f5ee65d3dd09bf6f0de1c Mon Sep 17 00:00:00 2001 From: ta264 Date: Mon, 18 Jan 2021 21:06:49 +0000 Subject: [PATCH] Fixed: Frontend error in confirm import dialog --- src/Readarr.Api.V1/BookFiles/BookFileResource.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Readarr.Api.V1/BookFiles/BookFileResource.cs b/src/Readarr.Api.V1/BookFiles/BookFileResource.cs index 742b7f90b..f54a39f20 100644 --- a/src/Readarr.Api.V1/BookFiles/BookFileResource.cs +++ b/src/Readarr.Api.V1/BookFiles/BookFileResource.cs @@ -1,6 +1,5 @@ using System; using System.Linq; -using NzbDrone.Common.Extensions; using NzbDrone.Core.DecisionEngine.Specifications; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Parser.Model; @@ -49,7 +48,7 @@ namespace Readarr.Api.V1.BookFiles return new BookFileResource { Id = model.Id, - BookId = model.EditionId, + BookId = model.Edition.Value?.BookId ?? 0, Path = model.Path, Size = model.Size, DateAdded = model.DateAdded, @@ -71,7 +70,7 @@ namespace Readarr.Api.V1.BookFiles Id = model.Id, AuthorId = author.Id, - BookId = model.EditionId, + BookId = model.Edition.Value?.BookId ?? 0, Path = model.Path, Size = model.Size, DateAdded = model.DateAdded,