Bug fix #231 : Some books without categories are not getting imported
This commit is contained in:
parent
bfceb58d6b
commit
c8c0ffeb0d
@ -3,7 +3,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>6.7.6.2</Version>
|
||||
<Version>6.7.7.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -121,7 +121,9 @@ namespace DtoImporterService
|
||||
: item.Categories[1].CategoryId;
|
||||
|
||||
// This should properly be SingleOrDefault() not FirstOrDefault(), but FirstOrDefault is defensive
|
||||
var category = DbContext.Categories.Local.FirstOrDefault(c => c.AudibleCategoryId == lastCategory);
|
||||
var category
|
||||
= DbContext.Categories.Local.FirstOrDefault(c => c.AudibleCategoryId == lastCategory)
|
||||
?? Category.GetEmpty();
|
||||
|
||||
Book book;
|
||||
try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user