From dac6877a06c5378e1617c89db5ec7d9196433019 Mon Sep 17 00:00:00 2001 From: MBucari Date: Tue, 28 Mar 2023 07:09:46 -0600 Subject: [PATCH] Fix #556 --- Source/DtoImporterService/LibraryBookImporter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/DtoImporterService/LibraryBookImporter.cs b/Source/DtoImporterService/LibraryBookImporter.cs index cc3b09e7..2942a774 100644 --- a/Source/DtoImporterService/LibraryBookImporter.cs +++ b/Source/DtoImporterService/LibraryBookImporter.cs @@ -41,7 +41,7 @@ namespace DtoImporterService // // CURRENT SOLUTION: don't re-insert - var existingEntries = DbContext.LibraryBooks.AsEnumerable().Where(l => l.Book is not null).ToDictionary(l => l.Book.AudibleProductId); + var existingEntries = DbContext.LibraryBooks.AsEnumerable().Where(l => l.Book is not null).ToDictionarySafe(l => l.Book.AudibleProductId); var hash = ToDictionarySafe(importItems, dto => dto.DtoItem.ProductId, tieBreak); int qtyNew = 0;